-
Notifications
You must be signed in to change notification settings - Fork 26
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
Inconsistent results when evaluating multiple required_providers with override files #205
Comments
Thank you for reporting this, it seems to be a bug caused by overlooking that the I didn't know that you could define the The current Perhaps merging the attributes of each |
After some more investigation, it appears there is a bug not only with multiple terraform blocks, but also with the behavior of overrides. In this issue, the latter is the case. Terraform's merge behavior is defined as follows, but TFLint probably doesn't implement it strictly. |
See also #205 Some rules that reference terraform blocks do not assume that blocks can be defined multiple times and can lead to inconsistent results in that case.
See also #205 Some rules that reference terraform blocks do not assume that blocks can be defined multiple times and can lead to inconsistent results in that case.
See also #205 Some rules that reference terraform blocks do not assume that blocks can be defined multiple times and can lead to inconsistent results in that case.
See also #205 Some rules that reference terraform blocks do not assume that blocks can be defined multiple times and can lead to inconsistent results in that case.
See also #205 Some rules that reference terraform blocks do not assume that blocks can be defined multiple times and can lead to inconsistent results in that case.
This bug has been fixed in TFLint v0.54.0 terraform-linters/tflint#2124 |
Summary
There seems to be an issue with tflint when there exists multiple
terraform
blocks which terraform merges according to the override files feature. In my case I'm using Terragrunt and have abackend.tf
,versions.tf
and aversions_override.tf
file when tflint is executed. When these three files exist with the example content tflint seems to suffer from a race condition or some other inconsistency in how it evaluates/merges the override file.This issue manifests itself in that tflint will only intermittently report a linting error. Note how in the output provided I run
tflint
7 times in a row in the shell, without any changes to the code in between, resulting in 2 out of those 7 executions reporting an error.Command
tflint
Terraform Configuration
backend.tf
provider.tf
versions.tf
versions_override.tf
TFLint Configuration
Output
TFLint Version
0.52.0, 0.53.0
Terraform Version
1.9.4
Operating System
The text was updated successfully, but these errors were encountered: