Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/filfreire/terraform-provider-git


https://github.com/filfreire/terraform-provider-git

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

# Terraform Provider for Git

> ⚠️ Note: This repository is a copy of , which no longer exists on GitHub.

## Requirements

- [Terraform](https://www.terraform.io/downloads.html) >= 0.12.x
- [Go](https://golang.org/doc/install) >= 1.14

## Usage

```hcl
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:

```sh
$ go build
```

To test the provider:

```sh
$ go test -v ./...
```

To run all acceptance tests:

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

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

To run a subset of acceptance tests:

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