Skip to content

Commit

Permalink
core/interpolations: Adding slice function to website
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 committed Mar 6, 2017
1 parent c848559 commit d7905c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion website/source/docs/configuration/interpolation.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@ The supported built-in functions are:
Example: `element(split(",", var.r53_failover_policy), signum(count.index))`
where the 0th index points to `PRIMARY` and 1st to `FAILOVER`

* `sort(list)` - Returns a lexicographically sorted list of the strings contained in
* `slice(list, from, to)` - Returns the portion of `list` between `from` (inclusive) and `to` (exclusive).
Example: `slice(var.list_of_strings, 0, length(var.list_of_strings) - 1)`

* `sort(list)` - Returns a lexographically sorted list of the strings contained in
the list passed as an argument. Sort may only be used with lists which contain only
strings.
Examples: `sort(aws_instance.foo.*.id)`, `sort(var.list_of_strings)`
Expand Down

0 comments on commit d7905c3

Please sign in to comment.