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

many-garden-84306

02/02/2020, 10:21 PM
@bored-river-53178 I've only used the python implementation but I've found I can do anything I like inside an Output.apply() callback, including opening and writing files. Just pass the referenced output as an "apply" input and you will be called with it resolved to its final value, and then you can do the file write inside the apply callback. The reason the underlying values are not available synchronously is that they are implemented as futures so the time required to fetch them from the other stack takes place concurrently with the rest of your stack.
b

bored-river-53178

02/02/2020, 10:30 PM
Thanks you, Sam, I will try that. But is there any option to really get this string value into a variable synchronously?
Basically, I need to emulate getOutputSync functionality without using getOutputSync, because it hangs
this is related https://www.pulumi.com/docs/troubleshooting/#stackreference-sync but I get no warning and StackReference name is just a string, so I do not know why it hangs