2b1e650df2
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. |
||
---|---|---|
.. | ||
funcs | ||
data.go | ||
data_test.go | ||
doc.go | ||
eval.go | ||
eval_test.go | ||
functions.go | ||
references.go | ||
scope.go |