-
Notifications
You must be signed in to change notification settings - Fork 881
Manually set terraform env variable prevents template creation #1359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ahh we should probably not use |
@kylecarbs @mafredri how detrimental is this? It seems like we should definitely make this change, but that it's probably okay to punt until after launch. LMK if you feel otherwise and I'll reconsider. |
Note that if you are using the embedded Terraform version you will get this message instead:
|
The tfexec library has a https://github.com/hashicorp/terraform-exec/blob/main/tfexec/cmd.go#L82-L89 |
OS Information
coder --version
: Coder v0.5.5-devel+2d3dc43 Tue May 10 07:44:09 UTC 2022Steps to Reproduce
export TF_LOG=1
coder server
coder templates create docker-local -d ~/src/cdr/coder/examples/docker-local
There should be no issue creating the template, or detailed hints on how to fix the problem (e.g. coder server is running with these environment variables set, please restart it without).
Actual
Template creation fails:
Notes
Considering this comment I wanted to see if I can get more information out of terraform (a naive approach). I think it's fine the value can't be changed but I would have expected this value to either propagate to terraform or for the server to either inform of a way to fix it or filter out the variable.
We could for instance filter out some incompatible
TF_
env vars here, potentially logging the exclusion as a warning:coder/provisioner/terraform/provision.go
Lines 93 to 111 in 2d3dc43
AC
Replace the terraform exec command with directly executing terraform
Test for the steps to repro this bug to validate this case is covered
Expose in the logs that the env vars are set
The text was updated successfully, but these errors were encountered: