The fn::join
built-in function joins the elements of a list of strings using a given delimiter. If any input to fn::join
is a secret, the result is also a secret.
Declaration
fn::join: [ delimiter, values ]
Parameters
Property | Type | Description |
---|---|---|
delimiter | string | The delimiter to use when joining values |
values | List | The list of strings to join |
Returns
The elements of values
joined by delimiter
.
Example
Definition
values:
list-of-strings:
- one
- two
- three
joined:
fn::join: [ ", ", ${list-of-strings} ]
Evaluated result
{
"list-of-strings": [
"one",
"two",
"three"
],
"joined": "one, two, three"
}
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.