tflint --recursive --call-module-type=all cannot find nested local modules #2082
Unanswered
mdowling17
asked this question in
Q&A
Replies: 1 comment 2 replies
-
If you recurse, those modules that you recurse into need to be properly initialized. Recursing and child module calls are entirely different things. Child modules have a formal tree relationship. Recursion assumes a tree structure of directories, but makes no logical assumptions about the relationships of those directories. Every recursed directory is an independent entity. When you've recursed into your child directories, there is no relationship that TFLint sees between your repository root and the module directory at that point. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
When running
tflint --recursive --call-module-type=all
with a file directory that contains nested local modules (that is local modules that call other remote/local modules), tflint saysError: "module1" module is not found. Did you run "terraform init"?
It seems to expect that I go into each of my local modules and runterraform init
. That seems totally unnecessary since it should be able to figure things out by looking at my root .terraform/modules folder created by running terraform init in the root.Command
tflint --recursive --call-module-type=all
Terraform Configuration
TFLint Configuration
Output
TFLint Version
0.51.2
Terraform Version
1.5.7
Operating System
Beta Was this translation helpful? Give feedback.
All reactions