Closed tommyallieri closed 10 months ago
a workaround is to specify the full, rather than relative path to .tflint.hcl
tflint --config "$(pwd).tflint.hcl" --module --recursive
If you just want to ignore instead of returing an error if .tflint.hcl
doesn't exist in a sub-directory, you can simply remove --config .tflint.hcl
. See also https://github.com/terraform-linters/tflint/issues/1926
Discussion on configuration inheritance is tracked in https://github.com/terraform-linters/tflint/issues/1929.
Summary
since the introduction of https://github.com/terraform-linters/tflint/pull/1940, which throws an error if
.tflint.hcl
is missing, it is now expecting a.tflint.hcl
file in every sub-directory when using the followingI tried adding to the
modules
directory, but it then errors out on the next one underneath.tflint.hcl
files shouldn't be recursively set in every sub-directory, it's not scalable. either bugfix should be removed and warn instead, or configuration should be inherited from the top, unless there's a flag I'm not seeing which would resolve this bugCommand
tflint --config .tflint.hcl --module --recursive
Terraform Configuration
TFLint Configuration
Output
TFLint Version
0.50.0
Terraform Version
No response
Operating System