terraform/website/docs/configuration/functions
Martin Atkins df47da1f8e website: "coalesce" function unifies its argument types
In order to be able to predict a result type even if arguments are not yet
known, coalesce requires all of its arguments to be of the same type. Our
usual automatic conversion rules mean that in some cases the result is
a silent type conversion rather than an explicit error, so we'll at least
document that so that folks who encounter it can understand what is
causing the likely-surprising behavior.

If we were building this function over again today I expect we'd make it
always return an error under type mismatch, but to do so now would be a
breaking change and the potential cost of that seems too high for
something that doesn't seem to arise incredibly often in practice.
2020-11-18 08:03:37 -08:00
..
abs.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
abspath.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
alltrue.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
anytrue.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
base64decode.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
base64encode.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
base64gzip.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
base64sha256.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
base64sha512.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
basename.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
bcrypt.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
can.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
ceil.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
chomp.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
chunklist.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
cidrhost.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
cidrnetmask.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
cidrsubnet.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
cidrsubnets.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
coalesce.html.md website: "coalesce" function unifies its argument types 2020-11-18 08:03:37 -08:00
coalescelist.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
compact.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
concat.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
contains.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
csvdecode.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
defaults.html.md lang/funcs: Experimental "defaults" function 2020-11-13 17:27:20 -08:00
dirname.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
distinct.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
element.html.md Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs 2020-11-11 19:31:05 -08:00
file.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
filebase64.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
filebase64sha256.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
filebase64sha512.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
fileexists.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
filemd5.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
fileset.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
filesha1.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
filesha256.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
filesha512.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
flatten.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
floor.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
format.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
formatdate.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
formatlist.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
indent.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
index.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
join.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
jsondecode.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
jsonencode.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
keys.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
length.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
list.html.md Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs 2020-11-11 19:31:05 -08:00
log.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
lookup.html.md Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs 2020-11-11 19:31:05 -08:00
lower.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
map.html.md Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs 2020-11-11 19:31:05 -08:00
matchkeys.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
max.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
md5.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
merge.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
min.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
parseint.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
pathexpand.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
pow.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
range.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
regex.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
regexall.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
replace.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
reverse.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
rsadecrypt.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
setintersection.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
setproduct.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
setsubtract.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
setunion.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
sha1.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
sha256.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
sha512.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
signum.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
slice.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
sort.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
split.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
strrev.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
substr.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
sum.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
templatefile.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
textdecodebase64.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
textencodebase64.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
timeadd.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
timestamp.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
title.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
tobool.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
tolist.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
tomap.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
tonumber.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
toset.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
tostring.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
transpose.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
trim.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
trimprefix.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
trimspace.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
trimsuffix.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
try.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
upper.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
urlencode.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
uuid.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
uuidv5.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
values.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00
yamldecode.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
yamlencode.html.md website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
zipmap.html.md website: Adopt a ton of pages into the "language" layout 2020-10-26 18:19:26 -07:00