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.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by