Commit Graph

6 Commits

Author SHA1 Message Date
Martin Atkins 5cb80c43c1 website: example of csvdecode with for_each
We added the csvdecode function originally with the intent of it being
used with for_each, but because csvdecode was released first we had a
section in its documentation warning about the downsides of using it with
"count", since that seemed like something people would be likely to try.

With resource "for_each" now merged, we can replace that scary section
with a more positive example of using these two features together.

We still include a paragraph noting that "count" _could_ be used here, but
with a caution against doing so. This is in the hope of helping users
understand the difference between these two patterns and why for_each is
the superior choice for most situations.
2019-07-31 12:43:16 -07:00
Kristin Laemmert 394cf7f25e
lang/funcs: add acc tests for functions (#21112)
* lang/funcs: testing of functions through the lang package API
The function-specific unit tests do not cover the HCL conversion that happens when the functions are called in a terraform configuration. For e.g., HCL converts sets to lists before passing it to the function. This means that we could not test passing a set in the function _unit_ tests.
This adds a higher-level acceptance test, plus a check that every (pure) function has a test.

* website/docs: update function documentation
2019-04-29 13:11:28 -04:00
Nick Fagerlund 2c50808bbb website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
Nick Fagerlund 17873ae61b website: Update functions section page titles 2018-12-20 14:20:42 -08:00
Kristin Laemmert 1a5299efcb porting encoding functions 2018-10-16 18:49:20 -07:00
Martin Atkins a491013054 website: Docs for all of the "encoding" functions 2018-10-16 18:47:33 -07:00