Skip to content
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

Closed
antonosmond opened this issue Feb 20, 2017 · 3 comments
Closed

Question / Proposal regarding new backend config #12114

antonosmond opened this issue Feb 20, 2017 · 3 comments

Comments

@antonosmond
Copy link

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 the terraform 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 run terraform 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.

@nanoz
Copy link

nanoz commented Feb 21, 2017

You may find an answer to this in #12067

@antonosmond
Copy link
Author

Thanks! I appreciate backends are still in beta and I'm sure everyone has big ideas!
TBH I decided having separate configs per env wasn't such a bad idea and have gone with that for now. In general the whole backend concept is awesome and at my company we've been waiting a LONG time for this and had to get by with wrapper scripts all over the place to configure the remotes! So glad to see proper backends are finally here! 😃 I'll close this issue.

@ghost
Copy link

ghost commented Apr 16, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants