Is there seriously NO way to just extract the valu...
# golang
s
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
can you share the code you have?
s
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
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
Appreciate that, and sorry if I came across as pushy. Thank you for all your help!