Support this project on Patreon
Keep your git repositories in sync with your infrastructure.
- Download
terraform-provider-git
binary from Github - Unzip the zip file
- Then move
terraform-provider-git
binary to$HOME/.terraform.d/plugins
directory
mkdir -p $HOME/.terraform.d/plugins
mv terraform-provider-git $HOME/.terraform.d/plugins/terraform-provider-git
- Run
terraform init
in your terraform project
terraform init
- repository_url - (Required) The URL of the remote repository
- author_name - (Optional) Name of the committer
- author_email - (Optional) Email of the committer
provider "git" {
repository_url = "git@github.com:fourplusone/tf-target.git"
author_name = "Matthias Bartelmeß - Terraform"
author_email = "mba@fourplusone.de"
}
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 "git_file" "demo_out_1" {
contents = "hello"
path = "hello/world.txt"
}