https://pulumi.com logo
#typescript
Title
# typescript
h

handsome-actor-1155

02/04/2020, 5:04 PM
Looking for some feedback, is this the best way to accomplish getting the vpcZones (availability zones) in use by the vpc?
Copy code
export const vpcZones = vpc.privateSubnetIds.then(function(subnetIds) {
    return subnetIds.map(function (id) {
        return id.apply(id => {
            return aws.ec2.getSubnet({id: id}).availabilityZone;
        });
    });
});
Seems like I really had to go several levels deep in the APIs to get what I wanted