Hey folks, quick question: How can I convert an ac...
# typescript
f
Hey folks, quick question: How can I convert an actual string into an
Output<string>
? I have a custom component that returns a string output: in some cases it will return an output from a child resource, but in some cases the value will be known immediately/synchronously and I want to return it in the same output property. What’s the simplest syntax to return such a string as output?
Never mind, I found it! It was not obvious in the doc, but by inspecting the code I found
Output.create(…)
. Thanks anyway! 👍
w
I believe `pulumi.interpolate`will also result in an Output<string>.
m
l
pulumi.output
would be my preferred choice.
const o: pulumi.Input<string> = pulumi.output(i);