lively-engine-75588
09/27/2024, 12:17 PMpulumi stack output
in cli, I get the expected result (img attached)
using the ts sdk however, pulumi fails to do so and returns undefined
. not clear on what I'm missing. Some examples below
• stack.getOutputValue("bucketConfig");
• stack.getOutputValue('bucketConfig').then(val => console.log(val));
• stack.outputs.apply(bucketConfig => {console.log(bucketConfig)});
whereas I can successfully print the name of my stack using: stack.name.apply(_name_
_=>_ { console.log("name is ${_name_}")});
clever-sunset-76585
09/27/2024, 12:53 PMStackReference
to read the outputs or are you using automation
API code?lively-engine-75588
09/29/2024, 11:13 AM_const_ stack = new pulumi.StackReference('account/project/stack')
I can successfully read the id
and name
in my script using the below
stack.name.apply(name => { console.log(`name is ${name}`)});
stack.id.apply(id => { console.log(`id is ${id}`)});
lively-engine-75588
09/29/2024, 11:14 AMoutputs
, they remain undefined, which could also mean it's not reaching the correct stack
. Is there any other method I could use to validate the pulumi instance is indeed my targeted stack?clever-sunset-76585
09/29/2024, 3:26 PMpulumi stack ls
and check what stacks you have and if the intended stack (the one with the outputs) is in the correct account, as well as if the stack that you are reading from is in the same account as the source stack.little-cartoon-10569
09/29/2024, 7:21 PM