This message was deleted.
# aws
s
This message was deleted.
l
The problem is that vpc.subnets returns a Promise, so when I try to get the availability zone from them, I'm return an Output<Promise<string>>.
availabilityZone: vpc.privateSubnets.then((subnets) => subnets[0].subnet.availabilityZone)
Which causes an error: Type 'Promise<string | Output<string>>' is not assignable to type 'Promise<string>'
Can I safely avoid this by wrapping it in an output? Will Pulumi unwrap any number of outputs / promises in order to get to a value?
availabilityZone: pulumi.output(vpc.privateSubnets).apply((subnets) => subnets[0].subnet.availabilityZone)