Looks like aws doesn't support workspaces in all t...
# general
a
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
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
💥 thank you @gentle-diamond-70147!