This message was deleted.
# general
s
This message was deleted.
m
Copy code
pulumi stack output apiHostName
returns the value I need
l
apiHostName is an output (kind of like a javascript promise). To access and print the raw value, you'll need to use .Apply. Check out the programming model docs here: https://www.pulumi.com/docs/intro/concepts/programming-model/#apply
👍 1
m
Thanks for the reply! I think my problem is, I do not inject the output to create a new resource (passing it as an argument) but use it to replace a string in a file. That's why I want to use the raw output value.
long story short: access putput values out of pulumi's context
l
If you are trying to use a stack reference outside of the context of a pulumi program, you can use GetValueAsync, which returns a task: https://github.com/pulumi/pulumi/blob/42d1a606a47ee66c478954fc505690ab1a2ad085/sdk/dotnet/Pulumi/Resources/StackReference.cs#L92
👍 1
Note that this function will throw if you try to use it on a secret value.
m
Thanks again for your patience. This was exactly what I was looking for 🙂