open-nomad/jobspec2
Mahmood Ali 2d6c75a17f
hcl2: handle unquoted undefined variables (#10419)
This fixes a regression in #10326, to handle unquoted unknown variables.

The HCL job may contain unquoted undefined variable references without ${...} wrapping, e.g. value = meta.node_class. In 1.0.4, this got parsed as value = "${meta.node_class}".

This code performs a scan to find the relevant ${ and }, and only tries to find the closest ones with whitespace as the only separator.
2021-04-21 13:24:22 -04:00
..
addrs copy variables files from Packer 2020-11-09 14:35:02 -05:00
hclutil hclv2: handle block labels 2020-10-26 16:24:43 -04:00
test-fixtures hclv2 tests: test complex config configuration 2020-10-26 16:20:41 -04:00
functions.go address review feedback 2020-10-22 11:49:37 -04:00
hcl_conversions.go tests: add tests for invalid syntax cases 2021-02-01 12:51:51 -05:00
helper_test.go appease deadcode linter 2020-11-12 11:44:49 -05:00
parse.go jobspec2: decode returns error in more cases (#9613) 2020-12-16 07:49:09 -08:00
parse_job.go appease deadcode linter 2020-11-12 11:44:49 -05:00
parse_map.go Restrict HCL special casing of map[string]interface{} fields 2020-11-12 11:35:39 -05:00
parse_test.go hcl2: handle unquoted undefined variables (#10419) 2021-04-21 13:24:22 -04:00
types.config.go hcl2: handle unquoted undefined variables (#10419) 2021-04-21 13:24:22 -04:00
types.variables.go Fix link in error for missing variable 2021-04-14 12:55:00 -04:00