This message was deleted.
# typescript
s
This message was deleted.
l
I think what you are after is in the docs here: https://www.pulumi.com/docs/intro/concepts/programming-model/#outputs-and-strings
Copy code
// concat takes a list of args and concatenates all of them into a single output:
const url1: Output<string> = pulumi.concat("http://", hostname, ":", port, "/");
// interpolate takes a JavaScript "template literal" and expands outputs correctly:
const url2: Output<string> = pulumi.interpolate `http://${hostname}:${port}/`;
f
Problem is that comes out as a Output<string>. Don't I need it as a string string to convert it to a base64 encoded secret.
b
can you use
yourStringOutput.apply(str => convertToBase64(str))
?
f
Brilliant. Yes that works. Thanks @limited-rainbow-51650 and @broad-helmet-79436 😄
🎉 1
b
🎉