github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/website/docs/language/functions/join.mdx (about) 1 --- 2 page_title: join - Functions - Configuration Language 3 description: |- 4 The join function produces a string by concatenating the elements of a list 5 with a given delimiter. 6 --- 7 8 # `join` Function 9 10 `join` produces a string by concatenating all of the elements of the specified 11 list of strings with the specified separator. 12 13 ```hcl 14 join(separator, list) 15 ``` 16 17 ## Examples 18 19 ``` 20 > join("-", ["foo", "bar", "baz"]) 21 "foo-bar-baz" 22 > join(", ", ["foo", "bar", "baz"]) 23 foo, bar, baz 24 > join(", ", ["foo"]) 25 foo 26 ``` 27 28 ## Related Functions 29 30 * [`split`](/terraform/language/functions/split) performs the opposite operation: producing a list 31 by separating a single string using a given delimiter.