fresh-spring-82225
02/20/2023, 6:48 PM.apply()
. For example, I create a vpc
const vpc = new awsx.ec2.Vpc(...)
then I want to add a route to a transit gateway to each route table
const onPremIps = ...
const transitGatewayIps = ...
const routeTables = aws.ec2.getRouteTablesOutput({ vpcId: vpc.vpcId })
routeTables.apply((rts) =>
rts.ids.forEach((id) => {
new aws.ec2.Route(`${id}-onprem-route`, {
routeTableId: id,
destinationCidrBlock: onPremIps,
transitGatewayId,
})
})
)
Is there some other way I’m supposed to be doing this kind of thing?Output
like Promise
and await
to get values.bright-flag-46266
02/21/2023, 8:22 AM