https://pulumi.com logo
Title
d

dry-keyboard-94795

12/06/2022, 4:44 PM
hmm, in python, it looks as if
yaml.ConfigFile
doesn't respect
opts.providers
, only
opts.provider
. Adding the explicit
.provider
also results in warning spam about this issue, even though the providers are identical, ie:
opts=p.ResourceOptions(provider=k8s_provider, providers=[k8s_provider])
I've a workaround already, just flagging it. Was hoping to move to using
.providers
going forward, as we have Component Resources that utilise multiple providers
l

limited-rainbow-51650

12/06/2022, 6:47 PM
@dry-keyboard-94795 the
yaml.ConfigFile
is in Pulumi speak a single resource, so that get’s provisioned using a single k8s provider. For a component, where you can mix resources from multiple providers, you have to pass the
providers
collection. There is no need to pass this collection to the child resources if you set the component resource as the
parent
in the child resource. Provider lookup traverses the
parent
links to find a provider. See the documentation page on
parent
for more info: https://www.pulumi.com/docs/intro/concepts/resources/options/parent/
d

dry-keyboard-94795

12/06/2022, 10:28 PM
Yep, we use the parent option. We're using a global ResourceOptions object, which we went changed to use
providers
as we added a component resource. Unfortunately, it looks like the ConfigFile resource depends on
provider
being passed explicitly to it. I've opened a github issue for it since with more details