terraform/website/docs/configuration/functions
Martin Atkins bfbd00a23c website: Note about using jsonencode/yamlencode in templatefile
It's a common source of errors to try to produce JSON or YAML syntax
using string concatenation via our template language but to miss some
details like correct string escaping, quoting, required commas, etc.

The jsonencode and yamlencode functions are a better way to generate JSON
and YAML, but it's not immediately obvious that both of these functions
are available for use in external templates (via templatefile) too.

Given that questions related to this come up a lot in our community forum
and elsewhere, it seems worth having a documentation section to show the
pattern of having a template that consists only of a single function call.
2019-12-11 12:57:01 -08:00
..
abs.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
abspath.html.md lang/funcs: add "abspath" function (#21409) 2019-07-02 08:30:30 -04:00
base64decode.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
base64encode.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
base64gzip.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
base64sha256.html.md website: Fix typographical errors in the docs for base64sha256/512 2019-11-08 09:43:27 -08:00
base64sha512.html.md website: Fix typographical errors in the docs for base64sha256/512 2019-11-08 09:43:27 -08:00
basename.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
bcrypt.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
ceil.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
chomp.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
chunklist.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
cidrhost.html.md website: Additional explanation for cidrsubnet function 2019-03-26 10:04:29 -07:00
cidrnetmask.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
cidrsubnet.html.md lang/funcs: cidrsubnets function 2019-09-20 15:58:01 -07:00
cidrsubnets.html.md website/docs: Corrects function name in `cidrsubnets` function documentation (#23473) 2019-11-26 07:50:32 -05:00
coalesce.html.md funcs/coalesce: return the first non-null, non-empty-string element from a sequence (#21002) 2019-04-12 13:57:52 -04:00
coalescelist.html.md lang/funcs: add acc tests for functions (#21112) 2019-04-29 13:11:28 -04:00
compact.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
concat.html.md lang/funcs: add acc tests for functions (#21112) 2019-04-29 13:11:28 -04:00
contains.html.md lang/funcs: remove sethaselement function and documentation (#21164) 2019-05-02 10:47:19 -04:00
csvdecode.html.md website: example of csvdecode with for_each 2019-07-31 12:43:16 -07:00
dirname.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
distinct.html.md website: Fix several spelling errors 2019-03-21 18:12:11 -07:00
element.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
file.html.md website: Typo in link to the templatefile function page 2019-03-15 14:12:26 -07:00
filebase64.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
filebase64sha256.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
filebase64sha512.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
fileexists.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
filemd5.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
fileset.html.md lang/funcs: Switch fileset() function glob implementation to github.com/bmatcuk/doublestar to support additional glob patterns 2019-08-30 20:22:03 -04:00
filesha1.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
filesha256.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
filesha512.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
flatten.html.md website: Full examples for for_each with flatten and setproduct 2019-10-11 13:41:58 -07:00
floor.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
format.html.md Add "leading zeros" for the sake of SEO 2019-06-25 16:13:05 -07:00
formatdate.html.md Fix docs mistake/misleading 2019-08-28 11:38:26 -04:00
formatlist.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
indent.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
index.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
join.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
jsondecode.html.md website: Fix some broken links 2019-02-28 16:21:09 -08:00
jsonencode.html.md website: Fix several spelling errors 2019-03-21 18:12:11 -07:00
keys.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
length.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
list.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
log.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
lookup.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
lower.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
map.html.md website: Fix various typos in the config function documentation 2019-03-11 13:59:12 -07:00
matchkeys.html.md website: correct the title of the "matchkeys" function page 2019-04-04 15:35:13 -07:00
max.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
md5.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
merge.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
min.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
parseint.html.md lang/funcs: parseint function 2019-09-17 15:33:22 -07:00
pathexpand.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
pow.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
range.html.md lang: "range" function 2019-06-04 16:20:17 -07:00
regex.html.md lang: "regex" and "regexall" functions 2019-08-06 11:52:14 -07:00
regexall.html.md lang: "regex" and "regexall" functions 2019-08-06 11:52:14 -07:00
replace.html.md lang: "regex" and "regexall" functions 2019-08-06 11:52:14 -07:00
reverse.html.md lang/funcs: add 'strrev' interpolation function. (#21091) 2019-04-24 14:52:39 -04:00
rsadecrypt.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
setintersection.html.md docs: Minor spelling and typo fixes 2019-09-05 10:08:34 -07:00
setproduct.html.md website: Full examples for for_each with flatten and setproduct 2019-10-11 13:41:58 -07:00
setunion.html.md docs: Minor spelling and typo fixes 2019-09-05 10:08:34 -07:00
sha1.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
sha256.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
sha512.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
signum.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
slice.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
sort.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
split.html.md website: Fix several spelling errors 2019-03-21 18:12:11 -07:00
strrev.html.md lang/funcs: add 'strrev' interpolation function. (#21091) 2019-04-24 14:52:39 -04:00
substr.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
templatefile.html.md website: Note about using jsonencode/yamlencode in templatefile 2019-12-11 12:57:01 -08:00
timeadd.html.md website: Added missing doublequotes. (#20696) 2019-03-19 11:23:24 -07:00
timestamp.html.md docs: Minor spelling and typo fixes 2019-09-05 10:08:34 -07:00
title.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
tobool.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
tolist.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
tomap.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
tonumber.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
toset.html.md website: Fix various typos in the config function documentation 2019-03-11 13:59:12 -07:00
tostring.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
transpose.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
trim.html.md lang/funcs: Add more `trim*` functions (#23016) 2019-11-18 08:31:44 -05:00
trimprefix.html.md lang/funcs: Add more `trim*` functions (#23016) 2019-11-18 08:31:44 -05:00
trimspace.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
trimsuffix.html.md lang/funcs: Add more `trim*` functions (#23016) 2019-11-18 08:31:44 -05:00
upper.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
urlencode.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
uuid.html.md lang/funcs: New "uuidv5" function 2019-06-07 14:38:22 -07:00
uuidv5.html.md docs: Minor spelling and typo fixes 2019-09-05 10:08:34 -07:00
values.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
yamldecode.html.md lang: yamldecode and yamlencode functions 2019-06-04 16:24:09 -07:00
yamlencode.html.md lang: yamldecode and yamlencode functions 2019-06-04 16:24:09 -07:00
zipmap.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00