Hi! I want to change a variable inside of pulumi.a...
# general
a
Hi! I want to change a variable inside of pulumi.all.apply method ... but when I these method end, values become to original values .... how could this value be maintained?
b
.Apply(..)
transforms your output so you need to then use your new output going forward.
Copy code
// receive old output
var oldOutput = ...;

// transform
var newOutput = oldOutput.Apply(...);

// use newOutput
does that help?
a
I need to save value ouput into string variable.
b
The output value is asynchronous so it isn't known at compile time, you need to either transform it and continue to pass it around / manipulate it as
Output<T>
or you need to await it so that you can manipulate it synchronously
👍 1