Files
opentf/website/docs/configuration/functions/list.html.md
Martin Atkins e7d71995f6 website: Document the remaining "collection" functions
This also renames some of the existing function pages whose source
filenames were not matching the usual naming scheme (.html.md).
2018-10-16 18:47:33 -07:00

829 B

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
functions list function docs-funcs-collection-list The list function constructs a list from some given elements.

list Function

~> This function is deprecated. From Terraform v0.12, the Terraform language has built-in syntax for creating lists using the [ and ] delimiters. Use the built-in syntax instead. The list function will be removed in a future version of Terraform.

list takes an arbitrary number of arguments and returns a list containing those values in the same order.

Examples

> list("a", "b", "c")
[
  "a",
  "b",
  "c",
]

Do not use the above form in Terraform v0.12 or above. Instead, use the built-in list construction syntax, which achieves the same result:

> ["a", "b", "c"]
[
  "a",
  "b",
  "c",
]