conf: docs added for length func

This commit is contained in:
Radek Simko 2015-04-15 18:55:49 +01:00
parent 4ef208d81b
commit 2078c593a2
1 changed files with 5 additions and 0 deletions

View File

@ -93,6 +93,11 @@ The supported built-in functions are:
only possible with splat variables from resources with a count only possible with splat variables from resources with a count
greater than one. Example: `join(",", aws_instance.foo.*.id)` greater than one. Example: `join(",", aws_instance.foo.*.id)`
* `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
* `${length("a,b,c")}` = 5
* `lookup(map, key)` - Performs a dynamic lookup into a mapping * `lookup(map, key)` - Performs a dynamic lookup into a mapping
variable. The `map` parameter should be another variable, such variable. The `map` parameter should be another variable, such
as `var.amis`. as `var.amis`.