What is the best way to handle multiple (Output&lt...
# general
c
What is the best way to handle multiple (Output<>) variable interpolation into a string. We are building a container definition set with multiple containers are have properties such as imageName and environment variables driven from Output of various resource types. What is the "Pulumi" way to handling this case of merging all the results of those properties into the final string. A hacky workaround we have now is to create a Task<> around the result of the .Apply<> call, but this seems to create some scenarios of unexpected hangs. Any help would be appreciated!
l
You can use
pulumi.all()
, which is the most generic way, but also very verbose. If you're just looking to create an
Output<string>
from other `Output<string>`s, then
pulumi.interpolate
is the sugar on top, to make it more readable.
c
I decided to re-read the documentation. What I was missing was the
Output.Tuple<...>
which allows for various data types; which is effectively what I needed. Thanks!
👍 1