-
Notifications
You must be signed in to change notification settings - Fork 358
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_deprecated_interpolation
: deeply inspect map/list attributes
#1257
Comments
There is nothing special about either of these two block types so I have a hard time seeing why this would be. That rule attempts to walk all expressions: Lines 143 to 186 in a18d094
That certainly includes walking |
Ok, did a bit of debugging here. The key characteristic of the examples is not their block types, it's the fact that it's an object expression. The rule is looking for expressions of type I seem to recall the logic for that rule was lifted from Terraform. In this case, the expression is actually a |
Similar to |
Thanks for analyzing it! I’ll see if we can contribute that change to |
It's a real tricky one for sure. There are presumably a fair number of collection types, e.g. a distinction between objects (known keys) and maps (unknown). Then there's sets/lists/tuples. It's almost certain that this is technically possible already, but I can imagine that implementing this elegantly could involve enhancing the |
terraform_deprecated_interpolation
: deeply inspect map/list attributes
For deeper walking, we can use However, since |
terraform_deprecated_interpolation does not detect interpolation everywhere in a configuration. Take the following two examples:
and
In both, the
"${var.environment}"
is not detected as deprecated interpolation-only variable.Interestingly, the same applies to
terraform fmt
, which does also not detect this. This might be related as tflint uses terraform built-in as far as I’m aware.Version
The text was updated successfully, but these errors were encountered: