Skip to content

Linting shared modules repo #2007

Answered by wata727
msl0 asked this question in Q&A
Discussion options

You must be logged in to vote

Note that the root module/child module relationship in terraform plan/apply may be different than the relationship in TFLint inspection. Terraform can hardly terraform plan/apply a shared module as a root module, but TFLint can inspect it as a root module. This allows you to check for issues specific to shared modules, such as the use of deprecated syntax.

On the other hand, issues caused by input variables cannot be found when inspected as the root module. In this case, similar to Terraform, you can find out by inspecting the actual root module that is called as a child module with --call-module-type=all/local.

Our recommendation is to inspect it both as a root module and (if possible) a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by msl0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants