github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/language/functions/list.html.md (about) 1 --- 2 layout: "language" 3 page_title: "list - Functions - Configuration Language" 4 sidebar_current: "docs-funcs-collection-list" 5 description: |- 6 The list function constructs a list from some given elements. 7 --- 8 9 # `list` Function 10 11 The `list` function is no longer available. Prior to Terraform v0.12 it was 12 the only available syntax for writing a literal list inside an expression, 13 but Terraform v0.12 introduced a new first-class syntax. 14 15 To update an expression like `list(a, b, c)`, write the following instead: 16 17 ``` 18 tolist([a, b, c]) 19 ``` 20 21 The `[ ... ]` brackets construct a tuple value, and then the `tolist` function 22 then converts it to a list. For more information on the value types in the 23 Terraform language, see [Type Constraints](/docs/language/expressions/types.html). 24 25 ## Related Functions 26 27 * [`concat`](./concat.html) produces a new list by concatenating together the 28 elements from other lists. 29 * [`tolist`](./tolist.html) converts a set or tuple value to a list.