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
As @Djuke mentioned in #6322 (comment) the old syntax for referencing map keys & list members via dots stopped working silently since #6322 was merged.
While I agree that the new syntax w/ square brackets is a lot better and making the old syntax work would be probably waste of time I think many people may have the old, dotted references in many places of their codebase and it will confuse them (and make upgrades painful) if we just silently ignore these in 0.7.
Terraform Version
Built from master (fcc3736e6bb850e51c240fda5c033888f13dcb34).
Just confirmed that a nicely specific error is raised in both usages in this example:
Error reading config for output first_minion: Invalid dot index found: 'var.minions.0'. Values in maps and lists can be referenced using square bracket indexing, like: 'var.mymap["key"]' or 'var.mylist[1]'. in:
${var.minions.0}
Error reading config for output black_code: Invalid dot index found: 'var.colour_codes.black'. Values in maps and lists can be referenced using square bracket indexing, like: 'var.mymap["key"]' or 'var.mylist[1]'. in:
${var.colour_codes.black}
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
Apr 23, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
As @Djuke mentioned in #6322 (comment) the old syntax for referencing map keys & list members via dots stopped working silently since #6322 was merged.
While I agree that the new syntax w/ square brackets is a lot better and making the old syntax work would be probably waste of time I think many people may have the old, dotted references in many places of their codebase and it will confuse them (and make upgrades painful) if we just silently ignore these in
0.7
.Terraform Version
Built from master (
fcc3736e6bb850e51c240fda5c033888f13dcb34
).Terraform Configuration Files
Debug Output
https://gist.github.com/radeksimko/6a2126a75ea08ca2fd3540b6b899c14e
Expected Behavior
Either an error or warning should've been raised about wrong syntax or unknown variable.
We are actually able to detect these already, see the attached debug log, search for
WARN
.Actual Behavior
Steps to Reproduce
terraform apply
References
New syntax w/ square brackets
This works as expected:
cc @jen20
The text was updated successfully, but these errors were encountered: