witty-monitor-18849
11/22/2021, 7:14 PMOutput<string>
to work as an argument to a function like [getsubnetids](https://www.pulumi.com/registry/packages/aws/api-docs/ec2/getsubnetids/) where arguments are of type string
and not Input<string>
?
Such as:
const publicSubnets = ec2.getSubnetIds({
vpcId: vpc.id, // Correctly results in "Type Output<string> is not assignable to type 'string'
tags: {
type: "public",
},
})
green-school-95910
11/22/2021, 7:40 PMapply
and get the promise inside the callback.
This wil wrap the promise in an output and resolve it withing Pulumi resource graphconst publicSubnets = vpc.id.apply(vpcId => ec2.getSubnetIds({
vpcId: vpcId,
tags: {
type: "public",
},
}))
witty-monitor-18849
11/22/2021, 10:57 PM