packer/hcl2template
Lucas Bajolet 434a1637f8 hcl2template: fix func to get vars from a config
The previous implementation of the GetVarsByType function worked only on
top-level attributes, ignoring the nested blocks in the structure.

This implies that if a datasource depends on another through an
expression within a nested block, we may not execute it first, and then
executing this datasource before its dependent is possible, resulting in
an error in the end.

This commit is an attempt at making this more reliable for HCL configs,
but only works on configs lifted from HCL files for now. We need to make
this more reliable for later iterations.
2023-10-05 10:31:04 -04:00
..
addrs [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
fixtures hcl2: fix crash on malformed overrides (#11881) 2022-07-20 14:30:49 -04:00
function [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
internal [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
repl [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
shim [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
testdata hcl2: report error on build without sources 2022-09-30 15:39:27 -04:00
common_test.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
components.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
decode.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
docs.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
formatter.go chore: remove refs to deprecated io/ioutil 2023-09-26 11:13:31 -04:00
formatter_test.go chore: remove refs to deprecated io/ioutil 2023-09-26 11:13:31 -04:00
functions.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
parser.go hcl2template: remove value validation for locals 2023-09-06 12:07:37 -04:00
plugin.go packer: remove implicit required plugins 2023-08-17 16:51:49 -04:00
types.build.from.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.build.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.build.hcp_packer_registry.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.build.hcp_packer_registry_test.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.build.post-processor.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.build.provisioners.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.build.provisioners_test.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.build_test.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.datasource.go hcl2template: simplify startDatasource function 2023-10-05 10:31:04 -04:00
types.datasource_test.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.hcl_post-processor.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.hcl_provisioner.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.hcl_ref.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.packer_config.go hcl2template: simplify startDatasource function 2023-10-05 10:31:04 -04:00
types.packer_config_test.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.required_plugins.go packer: remove implicit required plugins 2023-08-17 16:51:49 -04:00
types.required_plugins_test.go packer: remove implicit required plugins 2023-08-17 16:51:49 -04:00
types.source.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.source_test.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.variables.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
types.variables_test.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
utils.go hcl2template: fix func to get vars from a config 2023-10-05 10:31:04 -04:00
version.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00
version_required.go [COMPLIANCE] License changes (#12568) 2023-08-10 15:53:29 -07:00