Closed josh-padnick closed 7 years ago
I'm not an expert on Go template syntax, but I believe the dot syntax ({{ .foo }}
) means "look up foo
in the current context". When you're in a range
loop, that context is the items in the loop, of which HostedZoneComment
is not one. To get out of that context, you probably need to do something like {{ $.HostedZoneComment }}
. http://stackoverflow.com/questions/16734503/access-out-of-loop-value-inside-golang-templates-loop
That did it! Thx for the help. Guess I should have tried more Googling on that one.
Given:
boilerplate.yml:
main.tf:
I would expect this to work fine, but in fact, it fails with:
Any thoughts on what's going on here?