Replies: 2 comments 2 replies
This comment has been hidden.
This comment has been hidden.
-
|
Keys with literal dots in them are perfectly valid. Maybe this is a common pitfall you want to enforce in you org but it doesn't meet the criteria for this ruleset. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
lookup()look for a key in amap. Terraform beginners might be tempted to use it like:while this doesn't trigger an error, it always return 'default', instead of
local.my_map['parent-key']['child-key'].Using
try()gives the expected result:Proposal
Add an alert when a
lookup()call key contains a dot, that encourage to usetry()instead.References
Beta Was this translation helpful? Give feedback.
All reactions