Array lookup syntax: The syntax for looking up members of an array in Terraform is similar to most other programming languages: ARRAY[]. For example, here’s how you would look up the element at index 1 of var.user_names: var.user_names[1].
The length function: Terraform has a built-in function called length that has the following syntax: length(). As you can probably guess, the length function returns the number of items in the given ARRAY. It also works with strings and maps
Popularity
1/10 Helpfulness
1/10
Language whatever
Register to vote on and add code examples. Join our developer community to improve your dev skills and code like a boss!
No Good?
Help us improve our code examples by registering to vote on and add answers. Join our developer community to improve your dev skills and code like a boss!