What’s this javascript syntax: pulumi.interpolate ...
# typescript
e
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
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
Yes. That’s where I came across this functionality.
h
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
Thanks. That’s what I am looking for.