You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
We probably can't just use the current evaluator and parser as is because the test language has different semantics than the Terraform language. We would need to implement a dedicated emulator stack for the test language, which would require a fairly large refactoring.
A lot of the things can be parsed as-is, since the assertions are used in things like validation conditions. Even though there are some new fields possibly, I get at least some value (list index style for example) simply by renaming the files, and don’t notice any errors from the attributes that maybe tflint doesn’t know about.
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 flaggoogle_storage_bucket.foo.bar.0.main_page_suffix
vsgoogle_storage_bucket.foo.bar[0].main_page_suffix
being used.Terraform Configuration
The text was updated successfully, but these errors were encountered: