terraform/lang
Martin Atkins 2b1e650df2 lang/funcs: Fix out-of-bounds ArgError in templatefile function
The templatefile function only has two arguments, so ArgErrorf can be
called with only zero or one as the argument index. If we are out of
bounds then HCL itself will panic trying to build the error message for
this call when called as an HCL function.

Unfortunately there isn't really a great layer in Terraform to test for
this class of bug systematically, because we are currently testing these
functions directly rather than going through HCL to do it. For the moment
we'll just live with that, but if we see this class of error arise again
we might consider either reworking the tests in this package to work with
HCL expression source code instead of direct calls or adding some
additional tests elsewhere that do so.
2019-03-19 16:23:51 -07:00
..
funcs lang/funcs: Fix out-of-bounds ArgError in templatefile function 2019-03-19 16:23:51 -07:00
data.go core: Static-validate resource references against schemas 2018-11-26 08:25:03 -08:00
data_test.go core: Static-validate resource references against schemas 2018-11-26 08:25:03 -08:00
doc.go lang: new package for the runtime parts of the config language 2018-10-16 18:44:26 -07:00
eval.go vendor: go get github.com/hashicorp/hcl2@master 2019-03-19 10:04:45 -07:00
eval_test.go move "configschema" from "config" to "configs" 2018-10-16 18:50:29 -07:00
functions.go lang: New file-hashing functions 2019-01-25 10:18:44 -08:00
references.go lang: Consider "dynamic" blocks when resolving references 2019-03-19 10:04:45 -07:00
scope.go terraform: ugly huge change to weave in new HCL2-oriented types 2018-10-16 18:46:46 -07:00