don't interpolate atlas variables.

This commit is contained in:
Matthew Hooker 2017-01-12 16:08:54 -08:00
parent 3824ea157d
commit d0ef866639
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 10 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import (
"github.com/hashicorp/atlas-go/archive"
"github.com/hashicorp/atlas-go/v1"
"github.com/mitchellh/packer/helper/flag-kv"
"github.com/mitchellh/packer/template"
)
@ -189,7 +190,15 @@ func (c *PushCommand) Run(args []string) int {
}
// Collect the variables from CLI args and any var files
uploadOpts.Vars = core.Context().UserVariables
uploadOpts.Vars = make(map[string]string)
if vs := flags.Lookup("var"); vs != nil {
f := vs.Value.(*kvflag.Flag)
vars := map[string]string(*f)
for k, v := range vars {
uploadOpts.Vars[k] = v
}
}
// Add the upload metadata
metadata := make(map[string]interface{})