I've always used the output<string> directly and let pulumi handle providing the value. there is documentation page on inputs / output and lifting. I don't think you need to do what you are doing, we pass in the output to calls as needed and that is replaced by the value;
m
magnificent-sandwich-15839
02/03/2022, 2:16 PM
Oh I see. Thanks
d
damp-byte-39631
02/03/2022, 2:29 PM
Side note, any time you want to use an output inside of a template string, you'll need to use `pulumi.interpolate`output``
👍 1
l
little-cartoon-10569
02/03/2022, 7:59 PM
Not need. You can also use
apply()
. interpolate is sugar around apply.
In order to get a string "out" of an Output<string>, you need to put your "out" code inside the interpolate or apply. That is, you cannot get at the string at the same level of code where you have the Output. You must be inside a code black or string interpolation inside the apply (or interpolate).
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.