This message was deleted.
# general
s
This message was deleted.
w
If a provider is not specified, the corresponding provider on the parent component is used. If there is not one, it continues looking up the parent hierarchy. At the root Stack resource, the default provider is used. So you do not have to explicitly pass the provider along to children of a component - just the act of parenting them to the component will ensure they pick up the provider from the parent component. Do you have a small repro of exactly what you are trying to do? There may well be a bug in the awsx package here - but I suspect it is not just about passing provider on to children.
i
hmmm… Interesting. So in this line: https://github.com/pulumi/pulumi-awsx/blob/master/nodejs/awsx/ec2/vpc.ts#L68 Will it use the provider of the component?
Or in other words, assume, I have:
Copy code
const provider1 = ...
const provider2 = ...
I want to create 2 awsx.ec2.Vpcs - one for each provider. How should I crate them?
w
Ahh - that line appears to not be setting the parent either - which would be a bug and would cause the issue you are describing here. Could you open an issue to track this? Cc @lemon-spoon-91807.
i
@white-balloon-205 how the line should look like? Maybe I’ll crate a PR for this. Also can you check the subnets creation here: https://github.com/pulumi/pulumi-awsx/blob/master/nodejs/awsx/ec2/vpcTopology.ts#L121?
@luk
l
Yup. Will file issue and will try to fix today
i
@white-balloon-205 @lemon-spoon-91807 I updated https://github.com/pulumi/pulumi-awsx/pull/176 with the changes. Ran it now and it works.
l
I'll take a look later today. Thanks!