hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io
Other
43.13k stars 9.58k forks source link

Enable matching of uppercase environment variables #22671

Open marpada opened 5 years ago

marpada commented 5 years ago

Current Terraform Version

Terraform v0.12.7

Use-cases

The documentation about TF_VAR env variables says

On operating systems where environment variable names are case-sensitive, Terraform matches the variable name exactly as given in configuration, and so the required environment variable name will usually have a mix of upper and lower case letters as in the above example.

Our CD/CI managed system (Azure Pipelines) agent can run on Linux instances, but the agent converts environment variables to uppercase. https://github.com/microsoft/azure-pipelines-agent/issues/1645 To workaround this issue it would be good if Terraform could be configured to match uppercase environment variables.

Proposal

Introduce a command line flag allow matching of uppercase environment variables.

References

https://github.com/microsoft/azure-pipelines-agent/issues/1645

tobiasbueschel commented 2 years ago

This would also be great to have for GitHub Action repository environment variables as GitHub automatically converts to uppercase!

orefalo commented 2 years ago

same issue here

guidooliveira commented 2 years ago

same issue

mijhael3000 commented 2 years ago

same issue

ivancorroto commented 1 year ago

same issue

crw commented 1 year ago

Thanks for your interest in this issue! This is just a reminder to please avoid "+1" comments ("same issue"), and to use the upvote mechanism (click or add the 👍 emoji to the original post) to indicate your support for this issue. Thanks again for the feedback!

TechnicallyJoe commented 3 days ago

Stumbled upon this because we experienced a similar issue. Wouldn't it be a better solution to have terraform not be case-sensitive? Seems like an oversight..