tflint-ruleset-terraform icon indicating copy to clipboard operation
tflint-ruleset-terraform copied to clipboard

Add range to terraform_required_version errors

Open rdimartino opened this issue 1 year ago • 0 comments

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_version in variables.tf for 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!

rdimartino avatar May 20 '24 17:05 rdimartino