This message was deleted.
# typescript
s
This message was deleted.
l
The 3rd line is a no-op, you can simply do
const stackOutput = nodePoolStackRef.getOutput("clusterNodePool");
The 4th line is a no-op, you can simply do
const primaryNodePool = stackOutput;
. The last line is trying to convert an Output<string> (which isn't available at run time, it's a future value) to a string. You can't do this. Instead, you call
console.log()
in the future:
Copy code
primaryNodePool.apply(pnp => console.log(`nodepool: ${pnp}`));
s
I did try the above, the future value or callback gives a similar unable to convert Output, the only way it works is below which isn’t ideal
Copy code
const nodePoolOut = stackOutput.apply(primaryNodePool => {
   console.log(`nodepool: ${primaryNodePool}`);
   -- rest of code is added here ---
return {
  some exported values
}
});
l
Your code and mine are the same 🙂 The logging is inside the apply. That's the way it has to be.
s
Thank you for helping out,