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
..
2019-02-01 17:20:54 -08:00
2019-07-02 08:30:30 -04:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-11-08 09:43:27 -08:00
2019-11-08 09:43:27 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2020-01-10 15:23:25 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-03-26 10:04:29 -07:00
2019-02-01 17:20:54 -08:00
2019-09-20 15:58:01 -07:00
2019-11-26 07:50:32 -05:00
2019-04-12 13:57:52 -04:00
2019-04-29 13:11:28 -04:00
2019-02-01 17:20:54 -08:00
2019-04-29 13:11:28 -04:00
2019-05-02 10:47:19 -04:00
2019-07-31 12:43:16 -07:00
2019-02-01 17:20:54 -08:00
2019-03-21 18:12:11 -07:00
2019-02-01 17:20:54 -08:00
2019-03-15 14:12:26 -07:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-08-30 20:22:03 -04:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-10-11 13:41:58 -07:00
2019-02-01 17:20:54 -08:00
2019-06-25 16:13:05 -07:00
2019-08-28 11:38:26 -04:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-28 16:21:09 -08:00
2019-03-21 18:12:11 -07:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-03-11 13:59:12 -07:00
2019-04-04 15:35:13 -07:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2020-02-13 21:27:35 -05:00
2019-02-01 17:20:54 -08:00
2019-09-17 15:33:22 -07:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2020-01-13 09:17:47 -05:00
2019-08-06 11:52:14 -07:00
2019-08-06 11:52:14 -07:00
2019-08-06 11:52:14 -07:00
2019-04-24 14:52:39 -04:00
2019-02-01 17:20:54 -08:00
2020-02-06 12:49:11 -05:00
2020-02-06 12:49:11 -05:00
2020-02-06 12:49:11 -05:00
2020-02-06 12:49:11 -05:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-03-21 18:12:11 -07:00
2019-04-24 14:52:39 -04:00
2019-02-01 17:20:54 -08:00
2020-02-25 10:19:46 -05:00
2019-03-19 11:23:24 -07:00
2019-09-05 10:08:34 -07:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-03-11 13:59:12 -07:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-11-18 08:31:44 -05:00
2019-11-18 08:31:44 -05:00
2019-02-01 17:20:54 -08:00
2019-11-18 08:31:44 -05:00
2020-01-10 15:23:25 -08:00
2019-02-01 17:20:54 -08:00
2019-02-01 17:20:54 -08:00
2019-06-07 14:38:22 -07:00
2019-09-05 10:08:34 -07:00
2019-02-01 17:20:54 -08:00
2019-06-04 16:24:09 -07:00
2019-06-04 16:24:09 -07:00
2019-02-01 17:20:54 -08:00