|
|
|
|
@ -9,7 +9,7 @@ import (
|
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
"github.com/gobwas/glob"
|
|
|
|
|
hcl "github.com/hashicorp/hcl/v2"
|
|
|
|
|
"github.com/hashicorp/hcl/v2"
|
|
|
|
|
"github.com/hashicorp/hcl/v2/hcldec"
|
|
|
|
|
"github.com/hashicorp/hcl/v2/hclsyntax"
|
|
|
|
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
|
|
|
|
@ -128,6 +128,14 @@ func (cfg *PackerConfig) EvalContext(ctx BlockContext, variables map[string]cty.
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
versionFingerprint, ok := cfg.HCPVars["versionFingerprint"]
|
|
|
|
|
if ok {
|
|
|
|
|
ectx.Variables[packerAccessor] = cty.ObjectVal(map[string]cty.Value{
|
|
|
|
|
"version": cty.StringVal(cfg.CorePackerVersionString),
|
|
|
|
|
"versionFingerprint": versionFingerprint,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// In the future we'd like to load and execute HCL blocks using a graph
|
|
|
|
|
// dependency tree, so that any block can use any block whatever the
|
|
|
|
|
// order.
|
|
|
|
|
|