Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fourplusone/terraform-provider-git
Terraform provider to write git repositories
https://github.com/fourplusone/terraform-provider-git
terraform terraform-provider
Last synced: 23 days ago
JSON representation
Terraform provider to write git repositories
- Host: GitHub
- URL: https://github.com/fourplusone/terraform-provider-git
- Owner: fourplusone
- License: mit
- Created: 2019-03-01T20:56:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-04T23:08:18.000Z (almost 5 years ago)
- Last Synced: 2024-06-20T12:41:46.772Z (6 months ago)
- Topics: terraform, terraform-provider
- Language: Go
- Homepage:
- Size: 5.39 MB
- Stars: 21
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-provider-git
__[Support this project on Patreon](https://www.patreon.com/fourplusone)__
[![Build Status](https://travis-ci.com/fourplusone/terraform-provider-git.svg?token=Uozu8nkCaipWW1259XXD&branch=master)](https://travis-ci.com/fourplusone/terraform-provider-git)
## Rationale
Keep your git repositories in sync with your infrastructure.
## Install
* Download `terraform-provider-git` binary from [Github](https://github.com/fourplusone/terraform-provider-git/releases)
* Unzip the zip file
* Then move `terraform-provider-git` binary to `$HOME/.terraform.d/plugins` directory```bash
mkdir -p $HOME/.terraform.d/plugins
mv terraform-provider-git $HOME/.terraform.d/plugins/terraform-provider-git
```* Run `terraform init` in your terraform project
```bash
terraform init
```## Configuration
- repository_url - (Required) The URL of the remote repository
- author_name - (Optional) Name of the committer
- author_email - (Optional) Email of the committer### Configuration Example
```hcl
provider "git" {
repository_url = "[email protected]:fourplusone/tf-target.git"
author_name = "Matthias Bartelmeß - Terraform"
author_email = "[email protected]"
}
```## Resource
The following arguments are supported:
- content - (Required) The content of file to create.
- filename - (Required) The path of the file to create.
Any required parent directories will be created automatically, and any existing file with the given name will be overwritten.
### Resource Example
```hcl
resource "git_file" "demo_out_1" {
contents = "hello"
path = "hello/world.txt"
}
```