terraform/website/docs/configuration/functions
Martin Atkins 67d95b97ce lang/funcs: templatefile requires valid variable names
Previously the templatefile function would permit any arbitrary string as
a variable name, but due to the HCL template syntax it would be impossible
to refer to one that isn't a valid HCL identifier without causing an
HCL syntax error.

The HCL syntax errors are correct, but don't really point to the root
cause of the problem. Instead, we'll pre-verify that the variable names
are valid before we even try to render the template, and given a
specialized error message that refers to the vars argument expression as
the problematic part, which will hopefully make the resolution path
clearer for a user encountering this situation.

The syntax error still remains for situations where all of the variable
names are correct but e.g. the user made a typo referring to one, which
makes sense because in that case the problem _is_ inside the template.
2020-02-25 10:19:46 -05:00
..
abs.html.md
abspath.html.md
base64decode.html.md
base64encode.html.md
base64gzip.html.md
base64sha256.html.md
base64sha512.html.md
basename.html.md
bcrypt.html.md
can.html.md config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
ceil.html.md
chomp.html.md
chunklist.html.md
cidrhost.html.md
cidrnetmask.html.md
cidrsubnet.html.md
cidrsubnets.html.md website/docs: Corrects function name in `cidrsubnets` function documentation (#23473) 2019-11-26 07:50:32 -05:00
coalesce.html.md
coalescelist.html.md
compact.html.md
concat.html.md
contains.html.md
csvdecode.html.md
dirname.html.md
distinct.html.md
element.html.md
file.html.md
filebase64.html.md
filebase64sha256.html.md
filebase64sha512.html.md
fileexists.html.md
filemd5.html.md
fileset.html.md
filesha1.html.md
filesha256.html.md
filesha512.html.md
flatten.html.md
floor.html.md
format.html.md
formatdate.html.md
formatlist.html.md
indent.html.md
index.html.md
join.html.md
jsondecode.html.md
jsonencode.html.md
keys.html.md
length.html.md
list.html.md
log.html.md
lookup.html.md
lower.html.md
map.html.md
matchkeys.html.md
max.html.md
md5.html.md
merge.html.md doc typo 2020-02-13 21:27:35 -05:00
min.html.md
parseint.html.md
pathexpand.html.md
pow.html.md
range.html.md website/docs: Updated documentation for range function pseudocode (#23823) 2020-01-13 09:17:47 -05:00
regex.html.md
regexall.html.md
replace.html.md
reverse.html.md
rsadecrypt.html.md
setintersection.html.md lang: add setsubtract function (#23424) 2020-02-06 12:49:11 -05:00
setproduct.html.md lang: add setsubtract function (#23424) 2020-02-06 12:49:11 -05:00
setsubtract.html.md lang: add setsubtract function (#23424) 2020-02-06 12:49:11 -05:00
setunion.html.md lang: add setsubtract function (#23424) 2020-02-06 12:49:11 -05:00
sha1.html.md
sha256.html.md
sha512.html.md
signum.html.md
slice.html.md
sort.html.md
split.html.md
strrev.html.md
substr.html.md
templatefile.html.md lang/funcs: templatefile requires valid variable names 2020-02-25 10:19:46 -05:00
timeadd.html.md
timestamp.html.md
title.html.md
tobool.html.md
tolist.html.md
tomap.html.md
tonumber.html.md
toset.html.md
tostring.html.md
transpose.html.md
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
trimsuffix.html.md lang/funcs: Add more `trim*` functions (#23016) 2019-11-18 08:31:44 -05:00
try.html.md lang: "try" and "can" functions 2020-01-10 15:23:25 -08:00
upper.html.md
urlencode.html.md
uuid.html.md
uuidv5.html.md
values.html.md
yamldecode.html.md
yamlencode.html.md
zipmap.html.md