github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/website/docs/configuration/functions/values.html.md (about) 1 --- 2 layout: "functions" 3 page_title: "values - Functions - Configuration Language" 4 sidebar_current: "docs-funcs-collection-values" 5 description: |- 6 The values function returns a list of the element values in a given map. 7 --- 8 9 # `values` Function 10 11 -> **Note:** This page is about Terraform 0.12 and later. For Terraform 0.11 and 12 earlier, see 13 [0.11 Configuration Language: Interpolation Syntax](../../configuration-0-11/interpolation.html). 14 15 `values` takes a map and returns a list containing the values of the elements 16 in that map. 17 18 The values are returned in lexicographical order by their corresponding _keys_, 19 so the values will be returned in the same order as their keys would be 20 returned from [`keys`](./keys.html). 21 22 ## Examples 23 24 ``` 25 > values({a=3, c=2, d=1}) 26 [ 27 3, 28 2, 29 1, 30 ] 31 ``` 32 33 ## Related Functions 34 35 * [`keys`](./keys.html) returns a list of the _keys_ from a map.