-
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
Documentation incorrectly asserts that using a providers argument in a module block disables implicit provider inheritance #35781
Comments
Thanks for this report! |
I think correcting documentation would be good option, since the default provider would be called anyway if alias is not provided. I can take this bug to update documentation if agreed upon. |
I am going to have this reviewed in triage next week, I'll update here if we agree this is how the documentation should be changed. |
Any update on this Craig? |
Hi @yogi345, sorry for the delay. There was agreement in triage that the docs were probably written before implementation was finished, the way it was thought the feature would work, and not fixed afterwards for how the feature actually works. So basically we would want to do option 1, change the documentation so that it is correct. The main thing to do is just validate the claims made in the original post, and then update the documentations to match the actual functionality. I am going to be out for the next three weeks, but please feel free to take a look and file an appropriate pull request to the docs, otherwise we will try to pick this up again when I get back. Thanks! |
Sure @crw , I will validate the behavior and raise the documentation update PR. |
@yogi345 nope, don't worry about those checks. I am attempting to move this through the process now (I was out-of-office, but am back.) |
No problem Craig. Thanks for your response. Let me know the further
process, since this would be my 1st contribution.
…On Tue, 19 Nov, 2024, 4:48 am Craig Wright, ***@***.***> wrote:
@yogi345 <https://github.com/yogi345> nope, don't worry about those
checks. I am attempting to move this through the process now (I was
out-of-office, but am back.)
—
Reply to this email directly, view it on GitHub
<#35781 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLWBVIWPTOJYUZ7LURBOH32BJYUJAVCNFSM6AAAAABO3VCAHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBUGM2DQMRYHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Terraform Version
Affected Pages
https://developer.hashicorp.com/terraform/language/modules/develop/providers#passing-providers-explicitly
What is the docs issue?
The documentation linked says:
However, this does not appear to be true. I set up the following two files:
main.tf
In this
main.tf
, we have two AWS providers:aws
andaws.other
. We pass onlyaws.other
to theexample
module.example/main.tf
In the
example/main.tf
file, we create two SNS topics: one using the defaultaws
provider, and one using theaws.other
AWS alias. Based on the quote from the documentation, I would expect that the first of the two SNS topics would fail in some way, since it is using a default provider that was not passed to the module, and the default inheritance behavior should be overridden.But this works just fine, creating two topics in two different regions.
The upshot is that I believe the default inheritance behavior does continue to operate, even when the
providers
argument is used in a module block, contrary to the documentation I quoted. I think this is fundamentally the same issue as reported in #21923 and #25317.Proposal
There are two options I see:
providers
map, it will still be inherited in the same way as implicit provider inheritance."References
The text was updated successfully, but these errors were encountered: