terraform-linters / tflint-ruleset-terraform

TFLint ruleset for Terraform Language
Mozilla Public License 2.0
61 stars 21 forks source link

terraform_map_duplicate_keys for .tfvars files #201

Closed ericrichtert closed 1 month ago

ericrichtert commented 1 month ago

I's like to do some detection on duplicate keys in a map. terraform_map_duplicate_keys should do the trick, but our variables are populated in a .tfvars file.

With or without the --var-file=X.tfvars option, there is no detection of the duplicate keys. Is there a way to check the content of the .tfvars file?

Versions: TFLint version 0.52.0

BTW: 0.9.1 was the same behaviour

wata727 commented 1 month ago

Unfortunately, variable definitions files are not currently supported in this rule. This feature request is blocked by https://github.com/terraform-linters/tflint/issues/1949.