Summary
It sounds from #2030 like tftest.hcl files should be able to be linted.
It seems, however, as if tflint may not be parsing *.tftest.hcl files (it should also recurse into subdirectories when in recursive mode if there are directories with no .tf files but with .tftest.hcl files).
Taking a look at the code, including here, seems like some adjustments and tests might be needed for this to work?
In the example below, if the file is renamed to .tf, tflint will correctly flag google_storage_bucket.foo.bar.0.main_page_suffix vs google_storage_bucket.foo.bar[0].main_page_suffix being used.
Terraform Configuration
provider "google" {
project = "foo-testproject"
}
variables {
name = "test-me"
}
run "basic" {
command = plan
plan_options {
refresh = false
}
assert {
condition = google_storage_bucket.foo.bar.0.main_page_suffix == "index.html"
error_message = "Incorrect website main page suffix."
}
}
Summary
It sounds from #2030 like
tftest.hclfiles should be able to be linted.It seems, however, as if tflint may not be parsing
*.tftest.hclfiles (it should also recurse into subdirectories when in recursive mode if there are directories with no.tffiles but with.tftest.hclfiles).Taking a look at the code, including here, seems like some adjustments and tests might be needed for this to work?
In the example below, if the file is renamed to
.tf,tflintwill correctly flaggoogle_storage_bucket.foo.bar.0.main_page_suffixvsgoogle_storage_bucket.foo.bar[0].main_page_suffixbeing used.Terraform Configuration