-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform 12 string interpolation within heredocs break entire doc #154
Comments
reopening this. the bug isnt resolved, but instead we found a workaround for our use case. will come back to this after higher priority items. |
for reference, the mentioned workaround is for #113 |
I dug into this a little and found that variables that are determined after a deploy (like aws_sqs_queue.test_queue.arn) cause the entire JSON block to be "undefined"/nil. Ideally we'd want these variables to resolve as "UNDEFINED", or even better the variable name could be kept in place so the name could be used for matching in rules. |
If there is a string interpolation in the Resource definition, the test always returns an OK. |
Found a customer rule that is specifically looking to see if a particular parameter contains a variable. So hopefully we can fix this such that it still sees the variable, |
If a heredoc for a policy or alike has string interpolation, it will resolve to be null. Removing the variable will behave as expected.
When a policy has a string interpolation in it, config-lint always returns an OK.
Example:
resolves to:
Change
"Resource": "${aws_sqs_queue.test_queue.arn}"
to"Resource": "#{aws_sqs_queue.test_queue.arn}"
and now the resource (correctly) resolves toThe text was updated successfully, but these errors were encountered: