sparse-intern-71089
01/13/2023, 4:09 AMadamant-leather-41068
01/13/2023, 4:19 AMlet subnet = vpc.subnets.apply(subnets => {
for (const sn of subnets) {
let tagsCorrect = sn.tagsAll.apply(tags => {
if (tags["SubnetType"] === "Public") {
return true;
} else {
return false;
}
})
let availabilityZoneCorrect = sn.availabilityZone.apply(az => {
if (az === zoneName) {
return true;
} else {
return false;
}
})
if (availabilityZoneCorrect && tagsCorrect) {
return sn
} else {
console.log("Did not find subnet")
}
}
return null;
})
stocky-restaurant-98004
01/13/2023, 5:15 PMpublicSubnetIds
and privateSubnetIds
output on the VPC component. I believe they'll get generated in order, so your first AZ supplied should be the first ID in each subnetIds.