diff --git a/hcl2template/types.datasource.go b/hcl2template/types.datasource.go index 3deab8c71..839b804c6 100644 --- a/hcl2template/types.datasource.go +++ b/hcl2template/types.datasource.go @@ -62,7 +62,7 @@ func (ds *Datasources) Values() (map[string]cty.Value, hcl.Diagnostics) { return res, diags } -func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore, ref DatasourceRef, secondaryEvaluation bool) (packersdk.Datasource, hcl.Diagnostics) { +func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore, ref DatasourceRef) (packersdk.Datasource, hcl.Diagnostics) { var diags hcl.Diagnostics block := cfg.Datasources[ref].block diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index 8558add3b..a85ad9c1e 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -344,7 +344,7 @@ func (cfg *PackerConfig) evaluateDatasources(skipExecution bool) hcl.Diagnostics continue } - datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref, false) + datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref) diags = append(diags, startDiags...) if diags.HasErrors() { continue @@ -426,7 +426,7 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen // If we've gotten here, then it means ref doesn't seem to have any further // dependencies we need to evaluate first. Evaluate it, with the cfg's full // data source context. - datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref, true) + datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref) if startDiags.HasErrors() { diags = append(diags, startDiags...) return dependencies, diags, shouldContinue