opentofu/website/docs/configuration/functions
Martin Atkins 047733d20c website: Full examples for for_each with flatten and setproduct
A very common question since we launched the two repetition constructs
is how to deal with situations where the input data structure doesn't
match one-to-one with the desired configuration.

This adds some full worked examples of two common situations that have
come up in questions. To avoid adding a lot of extra content to the
already-large "expressions" and "resources" pages, the main bulk of this
new content lives with the relevant functions themselves as a full example
of one thing they are good for, and then we'll link to them from the two
general documentation sections where folks are likely to be reading when
they encounter the problem.
2019-10-11 13:41:58 -07: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: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
base64sha512.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -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: Link to hashicorp/subnets/cidr for cidrsubnets docs 2019-09-23 13:15:44 -07: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: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -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
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
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