Skip to content

richbecks/terraform-provider-git

 
 

Repository files navigation

Terraform Provider for Git

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

Packages

No packages published

Languages

  • Go 99.1%
  • Makefile 0.9%