https://pulumi.com logo
#golang
Title
s

salmon-account-74572

10/28/2020, 5:44 PM
Is there seriously NO way to just extract the value(s) from an
Output
when using a
StackReference
? I know I'm a Go newbie, but...wow. I have a value that represents the number of AZs in an AWS region. I just need to get to that value, and be able to use it as a number. No matter what I try, I just run right into a brick wall of
Output
limitations.
b

billowy-army-68599

10/28/2020, 6:12 PM
can you share the code you have?
s

salmon-account-74572

10/28/2020, 6:38 PM
I have this value being exported from an infrastructure stack:
Copy code
ctx.Export("numOfAZs", <http://pulumi.Int|pulumi.Int>(numOfAZs))
I'm then referencing it in another stack:
Copy code
numOfAZsOutput := ref.GetStringOutput(pulumi.String("numOfAZs"))
I would just like to get access to that value as an integer, so that I can use it to access arrays of subnet IDs and such. No matter what I try (using various
Apply
functions to the output, trying
reflect
, etc.), I can't just get to the numeric value stored in that variable.
I assume the silence means that there is no workaround? 😄
b

billowy-army-68599

10/30/2020, 12:38 AM
Hey sorry I missed this, I’ll try repro it this evening
actually I'll try follow up on this tomorrow @salmon-account-74572 - been a long day
s

salmon-account-74572

10/30/2020, 2:20 PM
Appreciate that, and sorry if I came across as pushy. Thank you for all your help!
3 Views