import * as aws from "@pulumi/aws" ; import * as pulumi from "@pulumi/pulumi" ; let zones ; export async function getAvailabilityZone ( index , opts ? ) { const azs = await getAvailabilityZones ( opts ) ; return azs [ index ] ; } export function getAvailabilityZones ( opts ? ) { if ( opts === undefined ) { if ( ! zones ) { zones = aws . getAvailabilityZones ( undefined , { async : true } ) . then ( r => r . names ) ; } return zones ; } return aws . getAvailabilityZones ( undefined , { ... opts , async : true } ) . then ( r => r . names ) ; }