When a simple directive is written, such as in this example, interpolation cannot be used. Using the $ character within the scope of the directive causes the linter to fail with an error.
Running tflint should succeed. It is what happens with v0.41.0.
Actual behavior
Running tflint (v0.42.0 and v0.42.1) fails with the following error:
Failed to check ruleset; Failed to check `terraform_deprecated_index` rule: main.tf:11,50-51: Invalid character; This character is not used within the language.
Introduction
When a simple directive is written, such as in this example, interpolation cannot be used. Using the
$
character within the scope of the directive causes the linter to fail with an error.Sample code (tested with Terraform 1.2.9):
Terraform happily accepts this:
Expected Behavior
Running
tflint
should succeed. It is what happens withv0.41.0
.Actual behavior
Running
tflint
(v0.42.0
andv0.42.1
) fails with the following error:Step to Reproduce
Run
tflint
on the code given above.