Files
opentf/website/docs/configuration/functions/values.html.md
Nick Fagerlund 596e529602 website: Adopt a ton of pages into the "language" layout
As of this commit, that layout doesn't exist yet, but I'm isolating the one-line
changes to their own commit to try and keep your eyes from glazing over.
2020-10-26 18:19:26 -07:00

875 B

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
language values - Functions - Configuration Language docs-funcs-collection-values The values function returns a list of the element values in a given map.

values Function

-> Note: This page is about Terraform 0.12 and later. For Terraform 0.11 and earlier, see 0.11 Configuration Language: Interpolation Syntax.

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,
]
  • keys returns a list of the keys from a map.