sparse-intern-71089
11/07/2021, 8:10 PMlittle-cartoon-10569
11/07/2021, 8:18 PMlittle-cartoon-10569
11/07/2021, 8:19 PMproviders
opt, or by passing the "right" one into the provider
opt.little-cartoon-10569
11/07/2021, 8:26 PMproviders
opt only uses specific keys (and I've never seen where those keys are defined), so in theory you could provide both providers via keys that Pulumi doesn't know about, then explicitly update the map based on the resource you're creating.
new MyComponentResource(name, args, { providers: { awsEast1: awsProv1, awsWest2: awsProv2 } });
.....
class MyComponentResource {
constructor(name, args, opts) {
...
new ResourceInEast1(name1, args1, { ...opts, providers: { ...opts.providers, aws: opts.providers.awsEast1 } });
new ResourceInWest2(name2, args2, { ...opts, providers: { ...opts.providers, aws: opts.providers.awsWest2 } });
(Utterly untested, that's completely a guess...)No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by