Add documentation for keys and values

Add documentation for the keys and values interpolation functions
This commit is contained in:
James Bardin 2016-06-29 15:11:08 -04:00
parent e78dc291af
commit 80365282cc
1 changed files with 4 additions and 0 deletions

View File

@ -161,6 +161,8 @@ The supported built-in functions are:
Note that if the item is a string, the return value includes the double
quotes.
* `keys(map)` - Returns a lexically sorted, JSON-encoded list of the map keys.
* `length(list)` - Returns a number of members in a given list
or a number of characters in a given string.
* `${length(split(",", "a,b,c"))}` = 3
@ -218,6 +220,8 @@ The supported built-in functions are:
* `uuid()` - Returns a UUID string in RFC 4122 v4 format. This string will change with every invocation of the function, so in order to prevent diffs on every plan & apply, it must be used with the [`ignore_changes`](/docs/configuration/resources.html#ignore-changes) lifecycle attribute.
* `values(map)` - Returns a JSON-encoded list of the map values, in the order of the keys returned by the `keys` function.
## Templates
Long strings can be managed using templates. [Templates](/docs/providers/template/index.html) are [resources](/docs/configuration/resources.html) defined by a filename and some variables to use during interpolation. They have a computed `rendered` attribute containing the result.