You're looking at documentation for Terraform v1.1 and earlier. Click here to view the latest content.
A new platform for documentation and tutorials is launching soon.
We are migrating Terraform documentation into HashiCorp Developer, our new developer experience.
list function is no longer available. Prior to Terraform v0.12 it was
the only available syntax for writing a literal list inside an expression,
but Terraform v0.12 introduced a new first-class syntax.
To update an expression like
list(a, b, c), write the following instead:
tolist([a, b, c])
[ ... ] brackets construct a tuple value, and then the
then converts it to a list. For more information on the value types in the
Terraform language, see Type Constraints.