join()
The function that glues a list of strings into one string with a separator between each.
In more detail
join(", ", ["Ada", "Grace"]) returns "Ada, Grace". It is often the last step after a for expression.
Example
join(", ", ["Ada", "Grace"])Related terms
- built-in function — One of Terraform's fixed set of functions, such as lower(), join() or jsonencode(), that transform values inside expressions.
- for expression — An expression that builds a new list or map by transforming each element of another collection, as in [for n in var.names : lower(n)].
Taught in
- Functions And Expressions In HCL — Infrastructure as Code with Terraform