chdir
doesn't respect .tflint.hcl
from the called directory
#1797
-
SummaryPrior to the deprecation of accepting path arguments, we relied on keeping a single We would like to continue to have a singular configuration for a monorepo, which was possible prior to this change. Commandtflint --chdir=some/dir Terraform Configurationterraform {
required_providers {
datadog = {
source = "DataDog/datadog"
}
}
} TFLint Configurationplugin "aws" {
enabled = true
version = "0.23.1"
source = "github.com/terraform-linters/tflint-ruleset-aws"
}
rule "terraform_unused_required_providers" {
enabled = true
}
rule "terraform_naming_convention" {
enabled = true
}
rule "terraform_required_providers" {
enabled = false
}
rule "terraform_required_version" {
enabled = false
} OutputN/A TFLint Version0.47.0 Terraform Version1.5.2 Operating System
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I'm not sure why this was converted to a discussion, I'd consider this a regression compared to pre 0.44 releases of tflint. |
Beta Was this translation helpful? Give feedback.
-
See https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/working-directory.md, this is still possible. We made the decision that |
Beta Was this translation helpful? Give feedback.
See https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/working-directory.md, this is still possible.
We made the decision that
chdir
should happen before anything meaningful, including loading configuration, and should be functionally equivalent tocd $dir && tflint
in a shell. Terraform does the same. It is not a regression/bug.