https://pulumi.com logo
Title
e

echoing-activity-32278

12/16/2021, 4:05 PM
What’s this javascript syntax: pulumi.interpolate
${resources.resourceGroup.name}-nodes
, ? How does the
pulumi.interpolate
work? This is ain’t a function call though.
w

witty-candle-66007

12/16/2021, 4:12 PM
I can’t answer the detailed “how”, but it is shorthand for handling resource outputs which need to be resolved before use. See https://www.pulumi.com/docs/intro/concepts/inputs-outputs/ The specific doc page for interpolate: https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#outputs-and-strings
e

echoing-activity-32278

12/16/2021, 4:21 PM
Yes. That’s where I came across this functionality.
h

happy-parrot-60128

12/16/2021, 5:38 PM
If you're asking about the js syntax, it's called a tagged template literal string
Tagged template literals call a function (the tag function) with an array of any text segments from the literal followed by arguments with the values of any substitutions, which is useful for DSLs
e

echoing-activity-32278

12/19/2021, 12:58 PM
Thanks. That’s what I am looking for.