Strange Warnings using the newer versions of tflint #1548
-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The rule in question tries to implement this official guidance: In other words, yes every module should have version constraints. Child modules can have looser constraints (minimum version only) while parents will often specify at least a minor version, if not an exact version. While often you could leave out requirements from a child module with no effect as long as the parent sets them, this would mean that the module is no longer reusable or a valid root module. In order to run |
Beta Was this translation helpful? Give feedback.
The rule in question tries to implement this official guidance:
https://www.terraform.io/language/expressions/version-constraints#terraform-core-and-provider-versions
In other words, yes every module should have version constraints. Child modules can have looser constraints (minimum version only) while parents will often specify at least a minor version, if not an exact version.
While often you could leave out requirements from a child module with no effect as long as the parent sets them, this would mean that the module is no longer reusable or a valid root module. In order to run
terraform init
among other commands you need a valid root module so generally it's best to give that treatme…