- v1.3.x (latest)
- v1.2.x
- v1.1 and earlier
- Overview
- Attributes as Blocks - Configuration Language
- Data Sources
- Overview
- abs
- abspath
- alltrue
- anytrue
- base64decode
- base64encode
- base64gzip
- base64sha256
- base64sha512
- basename
- bcrypt
- can
- ceil
- chomp
- chunklist
- cidrhost
- cidrnetmask
- cidrsubnet
- cidrsubnets
- coalesce
- coalescelist
- compact
- concat
- contains
- csvdecode
- dirname
- distinct
- element
- endswith
- file
- filebase64
- filebase64sha256
- filebase64sha512
- fileexists
- filemd5
- fileset
- filesha1
- filesha256
- filesha512
- flatten
- floor
- format
- formatdate
- formatlist
- indent
- index
- join
- jsondecode
- jsonencode
- keys
- length
- list
- log
- lookup
- lower
- map
- matchkeys
- max
- md5
- merge
- min
- nonsensitive
- one
- parseint
- pathexpand
- pow
- range
- regex
- regexall
- replace
- reverse
- rsadecrypt
- sensitive
- setintersection
- setproduct
- setsubtract
- setunion
- sha1
- sha256
- sha512
- signum
- slice
- sort
- split
- startswith
- strrev
- substr
- sum
- templatefile
- textdecodebase64
- textencodebase64
- timeadd
- timecmp
- timestamp
- title
- tobool
- tolist
- tomap
- tonumber
- toset
- tostring
- transpose
- trim
- trimprefix
- trimspace
- trimsuffix
- try
- type
- upper
- urlencode
- uuid
- uuidv5
- values
- yamldecode
- yamlencode
- zipmap
- Upgrading to Terraform v1.3
- v1.x Compatibility Promises
- Terraform Internals
- Intro to Terraform
- Configuration Language
- Terraform CLI
- Terraform Cloud
- Terraform Enterprise
- Provider Use
- Plugin Development
- Registry Publishing
- Integration Program
- Terraform Tools
- CDK for Terraform
- Glossary
Terraform Language
Other Docs
A new platform for documentation and tutorials is launching soon.
We are migrating Terraform documentation into HashiCorp Developer, our new developer experience.
»values
Function
values
takes a map and returns a list containing the values of the elements
in that map.
The values are returned in lexicographical order by their corresponding keys,
so the values will be returned in the same order as their keys would be
returned from keys
.
»Examples
> values({a=3, c=2, d=1}) [ 3, 2, 1, ]
> values({a=3, c=2, d=1})
[
3,
2,
1,
]
»Related Functions
keys
returns a list of the keys from a map.