terraform/lang/funcs
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
..
testdata
cidr.go lang/funcs: cidrsubnets function 2019-09-20 15:58:01 -07:00
cidr_test.go lang/funcs: cidrsubnets function 2019-09-20 15:58:01 -07:00
collection.go make the merge function more precise 2020-02-05 13:46:08 -05:00
collection_test.go update merge docs to match behavior 2020-02-05 15:47:36 -05:00
conversion.go
conversion_test.go
crypto.go remove satori/go.uuid in favor of google/uuid 2019-08-09 15:09:41 -04:00
crypto_test.go
datetime.go
datetime_test.go
encoding.go
encoding_test.go
filesystem.go lang/funcs: templatefile requires valid variable names 2020-02-25 10:19:46 -05:00
filesystem_test.go lang/funcs: templatefile requires valid variable names 2020-02-25 10:19:46 -05:00
number.go lang/funcs: parseint function 2019-09-17 15:33:22 -07:00
number_test.go lang/funcs: parseint function 2019-09-17 15:33:22 -07:00
string.go lang/funcs: Add more `trim*` functions (#23016) 2019-11-18 08:31:44 -05:00
string_test.go lang/funcs: Add more `trim*` functions (#23016) 2019-11-18 08:31:44 -05:00