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

acceptable-army-69872

09/30/2019, 10:07 PM
Looks like aws doesn't support workspaces in all their availability zones. So for my acct in east, they support workspaces in 1a, 1c, 1d. Is there a way to tell
awsx.ec2.Vpc
use this array of AZs? or am i stuck building out the subnets by hand?
g

gentle-diamond-70147

09/30/2019, 10:43 PM
You can specify the zone for each subnet with
location
, but if you specify it for one subnet, you have to specify it for all subnets - e.g.:
Copy code
const vpc = new awsx.ec2.Vpc("web-vpc", {
    cidrBlock: "172.30.0.0/16",
    subnets: [
        { type: "public", location: { availabilityZone: "us-west-2a", cidrBlock: "172.30.0.0/24" }, },
        { type: "public", location: { availabilityZone: "us-west-2b", cidrBlock: "172.30.1.0/24" }, },
    ],
    tags: {
        Name: "web-vpc",
    }
});
a

acceptable-army-69872

09/30/2019, 10:46 PM
💥 thank you @gentle-diamond-70147!