1. Docs
  2. Pulumi ESC
  3. Environment Definition Reference
  4. Built-in Functions
  5. fn::join

fn::join

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 ]
Copy

Parameters

PropertyTypeDescription
delimiterstringThe delimiter to use when joining values
valuesListThe 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} ]
Copy

Evaluated result

{
  "list-of-strings": [
    "one",
    "two",
    "three"
  ],
  "joined": "one, two, three"
}
Copy

Was this page helpful?

PulumiUP May 6, 2025. Register Now.