Closed gnuletik closed 3 months ago
Thank you for reporting this. This seems like an edge case.
Currently, this rule walks all expressions in a configuration file and evaluates the keys, but expressions in different scopes, such as for expressions, cannot be statically evaluated. This is because the value of "ingress_${sg_id}_http"
is not unique.
Ideally, we could expand the for expression before walking expressions, so we could check for all possible keys, but this is difficult to do in the current SDK features. Given this, the easiest fix we can make right now might be to just ignore the key if it fails evaluation.
Since latest version (
v0.9.0
), tflint raise an error with the following (valid) code