kind-addition-90773
11/15/2020, 1:25 AMfor (let i = 0; i < pulumi.output(subnets).apply(x => x.length); i++ ) {
// do something with subnets[i]
}
dazzling-sundown-39670
11/15/2020, 4:00 AMpulumi.output(subnets).apply(subnets => {
for (let i = 0; i < subnets.length; i++ ) {
// do something with subnets[i]
}
})
this should workapply<U>(func: (t: T) => Promise<U>): Output<U>
it's still an output outside the callback
The result remains a Output so that dependent resources can be properly tracked.
kind-addition-90773
11/16/2020, 4:43 AM