high-grass-3103
05/15/2023, 8:32 AMResourceError: Do not supply 'providers' option to a CustomResource. Did you mean 'provider' instead?No, I actually meant
providers
, why would you have a problem with it?
I have a component that creates resources from different providers, one of them is a non-default kubernetes provider. I don't want to create AWS resources with the kubernetes provider, nor Kubernetes resources with AWS provider...
Isn't that what providers
is for?
export interface ComponentResourceOptions extends ResourceOptions {
/**
* An optional set of providers to use for child resources. Either keyed by package name (e.g.
* "aws"), or just provided as an array. In the latter case, the package name will be retrieved
* from the provider itself.
*
* Note: only a list should be used. Mapping keys are not respected.
*/
providers?: Record<string, ProviderResource> | ProviderResource[];
red-match-15116
05/15/2023, 5:06 PMhigh-grass-3103
05/16/2023, 8:26 AMred-match-15116
05/16/2023, 4:52 PMAny way, I just pass providers to the component and they should magically apply to the resources?you could have multiple explicit aws providers for different regions because you have a cross-region component. it's not always clear how to map providers to resources so that has to be done by the user writing the component.
high-grass-3103
05/17/2023, 6:19 AM* Note: only a list should be used. Mapping keys are not respected.As a component implementer, I'd find it easier to use a map