-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: fix provider config inheritence for deeply nested modules #6186
Conversation
} | ||
|
||
func (n *graphNodeDisabledProviderFlat) DependentOn() []string { | ||
var result []string | ||
|
||
// If we're in a module, then depend on our parent's provider | ||
if len(n.PathValue) > 1 { | ||
prefix := modulePrefixStr(n.PathValue[:len(n.PathValue)-1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build failure (terraform/transform_provider.go:357: undefined: prefix) seems related to this?
@phinze looks like the build error here is correct and there is a stray deletion in the diff? |
Yeah final pre-push cleanup was a little overzealous - fixing! 😄 |
52a5d6c
to
813dc16
Compare
Ok green now, @jen20 PTAL! |
This LGTM now. |
There is still bug with nested modules (0.6.16) When I ask to destroy: terraform applyprovider.aws.region Default: us-east-1 I enter my value and then it runs refresh nicely through refresh state, but when it should start doing actual changes, then:
* No valid credential sources found for AWS Provider. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
The flattening process was not properly drawing dependencies between provider
nodes in modules and their parent provider nodes.
Fixes #2832
Fixes #4443
Fixes #4865