You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.
$ terraform -vTerraform v0.9.10
Terraform Configuration Files
# Copy-paste your Terraform configurations here - for large Terraform configs,# please use a service like Dropbox and share a link to the ZIP file. For# security, you can also encrypt the files using our GPG public key.
I've verified that as of Terraform v0.12.0-alpha1 -- a prerelease version of the forthcoming v0.12.0 major release -- Terraform will now produce an error if the same variable is assigned a value multiple times in the sametfvars file.
It is intentional that assignments in separate files (or separate assignments directly from the command line using -var=) have a "last assignment wins" rule, since that allows the user to "layer" variable values, such as by having a file with values that are used in most cases and then another separate file that selectively overrides it e.g. for special deployment environments.
We have also updated the documentation for setting variables in an attempt to be clearer about the override behavior and the value precedence when using overrides. This is not visible on the website yet since it is still showing the v0.11.10 documentation, but the changes will be published in conjunction with the v0.12.0 final release.
Since the duplicate-checking behavior is now present on master and will be included in the final release, I'm going to close this out. Thanks for reporting this, and sorry again for the delay in getting back to you about it.
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
locked and limited conversation to collaborators
Mar 31, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.Terraform Configuration Files
Debug Output
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the
crash.log
.Expected Behavior
Terraform should error when there are duplicate variable definitions in a *.tfvars file like it does for duplicate variable definitions in *.tf files.
Actual Behavior
No error, no warning. The last definition wins.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
The text was updated successfully, but these errors were encountered: