mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-03 14:00:59 -05:00
* lang/funcs: testing of functions through the lang package API The function-specific unit tests do not cover the HCL conversion that happens when the functions are called in a terraform configuration. For e.g., HCL converts sets to lists before passing it to the function. This means that we could not test passing a set in the function _unit_ tests. This adds a higher-level acceptance test, plus a check that every (pure) function has a test. * website/docs: update function documentation
28 lines
590 B
Markdown
28 lines
590 B
Markdown
---
|
|
layout: "functions"
|
|
page_title: "concat - Functions - Configuration Language"
|
|
sidebar_current: "docs-funcs-collection-concat"
|
|
description: |-
|
|
The concat function combines two or more lists into a single list.
|
|
---
|
|
|
|
# `concat` Function
|
|
|
|
-> **Note:** This page is about Terraform 0.12 and later. For Terraform 0.11 and
|
|
earlier, see
|
|
[0.11 Configuration Language: Interpolation Syntax](../../configuration-0-11/interpolation.html).
|
|
|
|
`concat` takes two or more lists and combines them into a single list.
|
|
|
|
## Examples
|
|
|
|
```
|
|
> concat(["a", ""], ["b", "c"])
|
|
[
|
|
"a",
|
|
"",
|
|
"b",
|
|
"c",
|
|
]
|
|
```
|