Backport of init: detect and report invalid submodules into v1.9 #35848
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #35839 to be assessed for backporting due to the inclusion of the label 1.9-backport.
🚨
The person who merged in the original PR is:
@liamcervante
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.
The below text is copied from the body of the original PR.
This PR updates
terraform init
so that if a module source is requesting a subdirectory within a registry module, where the registry module itself does exist and is successfully downloaded but the subdirectory is missing, Terraform correctly highlights the missing subdirectory as the problem rather than a generic "This is a bug in Terraform" message.Before
After
Fixes #35836
Target Release
1.9.x
Draft CHANGELOG entry
BUG FIXES
terraform init
: Highlight missing subdirectories of registry modules in error message.Overview of commits
2f6fe3e
2a2410d