fix: skip terraform validate on sub-modules without .terraform.lock.hcl#2741
fix: skip terraform validate on sub-modules without .terraform.lock.hcl#2741
Conversation
Change the terraform lint driver target from "parent" to "parent_with" with path ".terraform.lock.hcl" so that `terraform validate` only runs on root module directories where `terraform init` has been executed. Sub-module directories are skipped, preventing false positive "Missing required provider" and "Module not installed" errors. Closes #2740 https://claude.ai/code/session_016dWLoazBkTb9wWejVwJSKW
|
|
|
Coverage Impact - ubuntu-latest This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
|
Coverage Impact - macos-15 This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This reverts commit e47650b.

Summary
parenttoparent_withwith path.terraform.lock.hcl, soterraform validateonly runs on root module directories whereterraform inithas been executed.terraform.lock.hcl) are now skipped for validation, eliminating false positive "Missing required provider" and "Module not installed" errorsterraform fmtis unaffected and continues to work on all.tffiles including sub-modulesTest plan
terraform validateruns correctly on root module directories (those with.terraform.lock.hcl).terraform.lock.hclare skipped for validationterraform fmtstill applies to all.tffiles including sub-modulesCloses #2740
https://claude.ai/code/session_016dWLoazBkTb9wWejVwJSKW