-
-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
When using terraform -chdir and terraform-backend-git.hcl config file, the terraform-backend-git seems unhappy and throws
[terraform-backend-git]: repository must be set
How to reproduce
$ mkdir terraform
$ cat <<EOF > terraform/main.tf
resource "null_resource" "echo" {
provisioner "local-exec" {
command = "echo it works"
}
}
EOF
$ cat <<EOF > terraform-backend-git.hcl
git.repository = "$(git remote get-url origin)"
git.ref = "master"
git.state = "terraform.tfstate"
EOF
$ ./terraform-backend-git-linux-amd64 git terraform -chdir=terraform/ init
[terraform-backend-git]: repository must be setDoesn't matter if I put the config file in the -chdir target.
$ cp terraform-backend-git.hcl terraform/
$ ./terraform-backend-git-linux-amd64 git terraform -chdir=terraform/ init
[terraform-backend-git]: repository must be set
Without -chdir it does work
$ cd terraform/
$ ../terraform-backend-git-linux-amd64 git terraform init
[terraform-backend-git]: Using config file: /home/gb637/workspace/tfm-debug/terraform/terraform-backend-git.hcl
[terraform-backend-git]: WARNING: HTTP basic auth is disabled, please specify TF_BACKEND_GIT_HTTP_USERNAME and TF_BACKEND_GIT_HTTP_PASSWORD
[terraform-backend-git]: listen on 127.0.0.1:6061
Thanks for the great work on this project.
Metadata
Metadata
Assignees
Labels
No labels