Modules Folder Incorrectly Enforcing Provider/Version Constraints #211
Unanswered
Sohan-Opstree
asked this question in
Q&A
Replies: 1 comment
-
If you run TFLint on these modules, they are still subject to those requirements. The rules skip child modules: tflint-ruleset-terraform/rules/terraform_required_version.go Lines 48 to 51 in 9dcbac6 I'm guessing your pre-commit hook is recursing. If TFLint were loading these via the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I’m using Terraform with a directory structure where my modules are contained in a separate modules folder, which serves as the root module for other configurations. I have a wrapper code setup where the provider and version constraints are defined separately from the module configurations.
However, I am encountering an issue where the provider and version constraints defined in the wrapper code appear to be enforced on the modules as well, even though I have not specified any constraints within the modules themselves.
I have attempted to use annotations to ignore these constraints, but it did not resolve the issue.
I'm currently making use of pre-commit hook to ignore the folder but doesn't seems to best practice is their any other way to do this using tflint pre-commit hook
Output:
Command
tflint
Terraform Configuration
variable.tf
wrapper/route.tf
Output
TFLint Version
v1.94.1
Terraform Version
v1.9.5
Operating System
Beta Was this translation helpful? Give feedback.
All reactions