https://pulumi.com logo
#general
Title
# general
b

better-rainbow-14549

04/24/2019, 8:15 AM
is there a way to
await
an Output<>
c

cold-coat-35200

04/24/2019, 8:19 AM
Copy code
const mainOutput: any = await new Promise((resolve, reject) => {
    mainStackRef.getOutput('output').apply(t => resolve(t))
  })
That's how we do it, but it only works when the output is already known, e.g. output of another stack, you need to use apply on output if it's unknown beforehand
b

better-rainbow-14549

04/24/2019, 8:20 AM
ah interesting thanks
didnt think of that