-
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
Docs: "Passing Providers Explicitly" has an incorrect assertion #21923
Comments
NB: Nothing in the "Actual Behavior" section changes if main.tf is updated to not pass the module "child" {
source = "./child"
providers = {
aws.other = aws.other
}
} |
Hi @talton-heb, It looks like you have a "proxy configuration block" in your module exactly as described in the documentation:
As for the un-aliased provider, the docs state "a child module automatically inherits default (un-aliased) provider configurations from its parent", which is for convenience, but also because we don't currently require providers in configuration. This means you would get the same behavior whether or not you passed the |
However, I just tried a slightly different example, and it appears that you can override a default provider with an aliased provider. This was a deliberate decision on 0.11 which was to be removed in 0.12, and I have a feeling that this doc was written with the intent of changing that, but the implementation is what is failing to match. While this should be a CLI bug, due to the requirement that it changes the configuration, we may just need to update the docs until the net major release. |
Later on in the docs it also says:
It seems weird that in the example from my second comment the default inheritance behavior is still in effect. |
Both the functionality and documentation have been updated since this issue was opened, so I am going to close it. Please open a new issue if you continue to have a problem with terraform v0.13! |
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. |
Terraform Version
Terraform Configuration Files
main.tf
child/main.tf:
resulting terraform.tfstate: (snipped for relevance)
Debug Output
N/A
Crash Output
N/A
Expected Behavior
From the last part of Passing Providers Explicitly:
As the child module did not have an explicit proxy configuration block, I would have expected something along the lines of:
terraform validate
to fail"current"
and module ="module.child"
to have provider ="module.child.provider.aws"
the child module will behave as if it has no configurations of this type at all
Actual Behavior
terraform validate
succeeded"current"
and module ="module.child"
has provider ="provider.aws"
Steps to Reproduce
terraform init
terraform apply
The text was updated successfully, but these errors were encountered: