https://pulumi.com logo
#general
Title
# general
l

lively-coat-66786

06/11/2019, 2:25 PM
Hi, I'm trying to create Pulumi Node.js program in TypeScript to provision AWS services to multiple regions in one go, using @pulumi/awsx; I’m having trouble understanding what I’m doing wrong while trying to create VPCs in a loop. The regions get mixed while the program tries to create route tables and subnets, like this:
Copy code
aws:ec2:RouteTable (vpc-test-us-east-2-private-0):
    error: Plan apply failed: Error creating route table: InvalidVpcID.NotFound: The vpc ID 'vpc-03f05ae1180c62fd2' does not exist
g

gentle-diamond-70147

06/11/2019, 2:33 PM
Can you elaborate on the issue? When you say "the regions get mixed" do you mean Pulumi deploys resources to incorrect regions?
l

lively-coat-66786

06/11/2019, 2:37 PM
subcomponents of the VPC's are somehow bound to the configured aws:region instead of in the region of the provider that I create using
Copy code
let provider = new aws.Provider(`provider${commonSuffix}`, { region: region } );
g

gentle-diamond-70147

06/11/2019, 2:47 PM
I see, and yea, I'm able to reproduce this with your code. Trying to reproduce it with a different app...
👍 1
It's a bug. I've opened https://github.com/pulumi/pulumi-awsx/issues/314 to track it.
l

lively-coat-66786

06/11/2019, 4:02 PM
Thank you
b

big-piano-35669

06/12/2019, 3:51 AM
Looks like @lemon-spoon-91807 already fixed this in https://github.com/pulumi/pulumi-awsx/pull/316, yay! 🎉 @bitter-oil-46081 @lemon-spoon-91807 when will a new release be cut?
😎 1
l

lemon-spoon-91807

06/12/2019, 3:51 AM
Preferably after tomorrow 🙂
i'd like to not cut anything for the next 24 hours