What's the best practice for working with `Compone...
# typescript
What's the best practice for working with
? I see pulumi has an internal function
to convert from
Record<string, ProviderResource> | ProviderResource[]
to map, but it's not exported. I need to pass the provider to a kubernetes resource inside a component.
Resources inherit provider defaults from their parents. So if you set
parent: this
on the kubernetes resource inside the component, it will inherit the corresponding
set on its parent component. Note that since components can have multiple relevant providers (because they may create resources of several types), they are provided as
providers: { “kubernetes”: kubeProvider }
. Ideally - the documentation here would address this: https://pulumi.io/reference/programming-model/#providers. If there is anything critical you don’t see there - let us know.
That answered it! Thanks, I missed that section when reading it.