-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Explicit passing of providers to grandchild modules not working #17399
Comments
Hi @sjauld, Sorry that this is still a bit confusing. Once we get the new configuration framework in place We're going to revisit the structure of the providers a bit more. In the documentation for modules within providers, we mention that a configuration must have what we refer to as "proxy configuration blocks" for the providers it wants to receive. In order to make this system a bit more flexible and work with existing modules, I added the ability to allow passing a provider into a module with no corresponding block for that provider (#16619). However in order for the receiving module to pass on the provider again, it will still require a block in the configuration to reference. What the "a" module needs is empty configuration blocks for the 3 providers, like so:
Since the module is already using the providers by name, there's no additional coupling caused by requiring the empty "proxy" configuration blocks. This still can cause issues when modules want to set version constraints, which is what we're going to cover in #16835. |
Ah, thanks @jbardin! |
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
Debug Output
N/A
Crash Output
N/A
Expected Behavior
Providers are explicitly passed from root module to module A to module B and we can therefore create resources in module B
Actual Behavior
Steps to Reproduce
Additional Context
There are other issues on the grandchild topic, but I believe they all related to implicit inheritance so I opened this one on explicit inheritance.
References
The text was updated successfully, but these errors were encountered: