sparse-intern-71089
10/20/2021, 8:28 PMlittle-cartoon-10569
10/20/2021, 8:31 PMmillions-umbrella-34765
10/20/2021, 8:41 PMdependsOn: [myOrg]
so I don't think I can put a conditional around that. Originally, I thought I would have the org creating in one project and then refer to in a separate project for the GD master account... but I wasn't sure how to do dependsOn
to refer to the org in another stack.little-cartoon-10569
10/20/2021, 8:44 PMlittle-cartoon-10569
10/20/2021, 8:47 PMmillions-umbrella-34765
10/20/2021, 8:48 PMlittle-cartoon-10569
10/20/2021, 8:48 PMmillions-umbrella-34765
10/20/2021, 8:49 PMlittle-cartoon-10569
10/20/2021, 8:50 PMgreat-sunset-355
10/21/2021, 6:01 AMComponentResources
you can use pulumi.ResourceOptions.merge()
function to merge the opts
passed in.
Then inside the component I merge
function to override the provider that may have come from opts
self._config = app_config
# merge parent options and override with child options
self._opts = pulumi.ResourceOptions.merge(
opts,
pulumi.ResourceOptions(
parent=self,
provider=self._config.aws_provider,
),
)
This way I make sure to not use the default provider.
Also, make sure that each resource inside component uses opts=self._opts