terraform-provider-git

MPL-2.0 License

Stars
0
Committers
3

Terraform Provider for Git

⚠️ Note: This repository is a copy of https://github.com/innovationnorway/terraform-provider-git, which no longer exists on GitHub.

Requirements

Usage

provider "git" {}

data "git_repository" "example" {
  path = path.root
}

resource "azurerm_resource_group" "example" {
  ...

  tags = {
    branch = data.git_repository.example.branch
    commit = substr(data.git_repository.example.commit_sha, 0, 7)
    tag    = data.git_repository.example.tag
  }
}

Contributing

To build the provider:

$ go build

To test the provider:

$ go test -v ./...

To run all acceptance tests:

Note: Acceptance tests create real resources, and often cost money to run.

$ TF_ACC=1 go test -v ./...

To run a subset of acceptance tests:

$ TF_ACC=1 go test -v ./... -run=TestAccDataSourceGitRepository