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

quaint-hair-91883

04/21/2022, 1:45 PM
How do I get the actual
string
value out of
pulumi.StringOutput
or
pulumi,StringPtrOutput
?
e

echoing-dinner-19531

04/21/2022, 2:44 PM
https://www.pulumi.com/docs/intro/concepts/inputs-outputs/ You can't get the value out, what you can do is write an apply function to get access to the value. For Go that would look something like:
Copy code
resultOutput := strOutput.ApplyT(func(value string) string {
    return // do something with value
}).(pulumi.StringOutput)
Most other resources will accept Outputs as part of their constructor arguments, so your
Params
struct could probably just take outputs as well.
7 Views