https://pulumi.com logo
#general
Title
# general
i

icy-controller-6092

12/19/2023, 7:21 AM
if i set a custom provider for a
ComponentResource
, and inside the constructor of the CR I create a child resource but forget to add
{ parent: this }
, which provider does the child resource use?
d

dry-keyboard-94795

12/19/2023, 12:08 PM
It'll use your global default provider. You must use the parent option for it to become a child of the component resource
l

little-cartoon-10569

12/19/2023, 7:03 PM
It is also limited by the allowed providers. Resources defined in a package will only use providers compatible with that package. Child resources from the aws package will only use an aws.Provider, etc.
This is why providers is an opt.