From 80365282cc98feb549689c0c5252742e7303da04 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 29 Jun 2016 15:11:08 -0400 Subject: [PATCH] Add documentation for keys and values Add documentation for the keys and values interpolation functions --- website/source/docs/configuration/interpolation.html.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/source/docs/configuration/interpolation.html.md b/website/source/docs/configuration/interpolation.html.md index 6b38c7807e..47b21b7196 100644 --- a/website/source/docs/configuration/interpolation.html.md +++ b/website/source/docs/configuration/interpolation.html.md @@ -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.