I have two instances of the AzureRM provider in my root module. One is the default, with no alias. The second has an alias and is only used in a couple of cases.
I have a child module that needs to use both of these providers. When calling the child module I must use the ‘providers’ meta-argument. But, here is where I need clarification. In the ‘providers’ meta-argument, do I only need to define the aliased provider? Or do I need to define both the non-aliased provider plus the aliased provider?
In other words, can the child module inherit my default provider from the root plus use the aliased provider passed to it?
The end goal would be to have a mix of resources in the child module, some resources that do not have a ‘provider’ attribute set and they would inherit the default provider from the root module, and then I’d have resources with ‘provider’ set and it would use what’s passed to it via the ‘providers’ meta-argument.