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

Allow custom environment variable mapping in variable block #11296

Closed
zpatrick opened this issue Jan 19, 2017 · 2 comments
Closed

Allow custom environment variable mapping in variable block #11296

zpatrick opened this issue Jan 19, 2017 · 2 comments

Comments

@zpatrick
Copy link
Contributor

It would be nice to allow an optional override of the default TF_VAR_ environment variable mapping inside the variable block:

variable "endpoint" {
  default = "abc"
  env     = "ENDPOINT"
}

My use case: It becomes tedious keeping multiple environment variables in sync when working with terraform + another tool (or set of tools) that use environment variables for configuration. Today, I need to make sure ENDPOINT=abc is set for tool x, and TF_VAR_endpoint=abc is set for terraform. Allowing this override would remove this (albeit small) pain point.

I'd be happy to tackle this feature - but first wanted to get input from some of the core members in case this has deeper implications I'm not seeing.

@grubernaut
Copy link
Contributor

Duplicate of #62, closing for now. I believe @mitchellh may have more to add, but it's definitely a topic that's talked about internally quite often. There are still a few core issues with adding environment variable interpolation at this stage. It's definitely something we wish to target in the future, as it's a heavily requested feature. Thanks!

@ghost
Copy link

ghost commented Apr 17, 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 17, 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