-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Question / Proposal regarding new backend config #12114
Comments
You may find an answer to this in #12067 |
Thanks! I appreciate backends are still in beta and I'm sure everyone has big ideas! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform v0.9.0-beta1 (4e96da5)
Currently, the new backend configs under the
terraform {}
block don't support interpolations, however as well as having a default backend config there is the ability to specify additional config during theterraform init
with the-backend-config=path
flag. This is great, but if you only want to define a single additional value, creating a separate file for it seems unnecessary. As an example, I'm using an S3 backend and want my S3 key to include the environment I'm deploying to. The S3 key is my only value that's different from the main backend config. To achieve this in the current setup, I'd have to create separate files for dev, test, production etc, with just the S3 key value in then runterraform init -backend-config=path/to/env/config
. It'd be nice if there was a shorthand way to define these, maybe with environment variables or something e.g.TF_BACKEND_S3_KEY=somevalue
That way I could avoid littering my repo with additional config files and on deployments just set the env var to the value I want before running the init.
The text was updated successfully, but these errors were encountered: