tflint-ruleset-terraform
tflint-ruleset-terraform copied to clipboard
Add range to terraform_required_version errors
Fixes #177
I wondered about sorting the blocks / filenames or looking for main.tf, but decided to keep it simple.
A couple questions came up for me:
-
Is it ok to use the first block? Should we sort by filename or line number or something?
-
Pulling an arbitrary filename from the map of files doesn't feel great. It seems weird for the error to suggest placing the
required_versioninvariables.tffor instance. Maybe we should just show the directory if no"terraform"blocks are found? We could parse that out of the filename.
Let me know what you think.
Thanks!