Commit 2e5f3da5 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/amazon: fix {{uuid}} default not being replaced

parent e6bf497e
......@@ -3,9 +3,11 @@ package common
import (
"errors"
"fmt"
"github.com/mitchellh/packer/packer"
"os"
"time"
"github.com/mitchellh/packer/common/uuid"
"github.com/mitchellh/packer/packer"
)
// RunConfig contains configuration for running an instance from a source
......@@ -81,7 +83,8 @@ func (c *RunConfig) Prepare(t *packer.ConfigTemplate) []error {
}
if c.TemporaryKeyPairName == "" {
c.TemporaryKeyPairName = "packer {{uuid}}"
c.TemporaryKeyPairName = fmt.Sprintf(
"packer %s", uuid.TimeOrderedUUID())
}
// Validation
......
......@@ -3,12 +3,13 @@ package packer
import (
"bytes"
"fmt"
"github.com/mitchellh/packer/common/uuid"
"os"
"strconv"
"strings"
"text/template"
"time"
"github.com/mitchellh/packer/common/uuid"
)
// InitTime is the UTC time when this package was initialized. It is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment