Config file exists in project root directory but seems ignored #1706
-
SummaryThe There is Command
Terraform ConfigurationN/A TFLint Configurationplugin "terraform" {
enabled = true
preset = "recommended"
}
plugin "azurerm" {
enabled = true
version = "0.21.0"
source = "github.com/terraform-linters/tflint-ruleset-azurerm"
}
rule "terraform_typed_variables" {
enabled = false
} OutputRun with implicit/automatic $ tflint --format compact --recursive | grep terraform_typed_variables | wc -l
87 Run with explicit $ tflint --format compact --recursive --config .tflint.hcl | grep terraform_typed_variables | wc -l
87 Run with explicit $ tflint --format compact --recursive --config $PWD/.tflint.hcl | grep terraform_typed_variables | wc -l
0 Interestingly, if I give the config file but via relative path, then I get this error: $ tflint --format compact --recursive --config ./.tflint.hcl
Failed to load TFLint config; failed to load file: open ./.tflint.hcl: no such file or directory TFLint Version0.45.0 Terraform Version1.3.7 Operating System
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/config.md#configuring-tflint
I've updated this to clarify that this still applies to a config explicitly provided via a flag: You can argue this behavior is confusing/awkward, but given the reverse it would be impossible to customize the name of the config file stored in each module. |
Beta Was this translation helpful? Give feedback.
https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/config.md#configuring-tflint
I've updated this to clarify that this still applies to a config explicitly provided via a flag:
2d73106
You can argue this behavior is confusing/awkward, but given the reverse it would be impossible to customize the name of the config file stored in each module.