builder/amazon: fix {{uuid}} default not being replaced
This commit is contained in:
parent
e6bf497eac
commit
2e5f3da5c1
|
@ -3,9 +3,11 @@ package common
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/mitchellh/packer/packer"
|
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/mitchellh/packer/common/uuid"
|
||||||
|
"github.com/mitchellh/packer/packer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RunConfig contains configuration for running an instance from a source
|
// 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 == "" {
|
if c.TemporaryKeyPairName == "" {
|
||||||
c.TemporaryKeyPairName = "packer {{uuid}}"
|
c.TemporaryKeyPairName = fmt.Sprintf(
|
||||||
|
"packer %s", uuid.TimeOrderedUUID())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validation
|
// Validation
|
||||||
|
|
|
@ -3,12 +3,13 @@ package packer
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/mitchellh/packer/common/uuid"
|
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/mitchellh/packer/common/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InitTime is the UTC time when this package was initialized. It is
|
// InitTime is the UTC time when this package was initialized. It is
|
||||||
|
|
Loading…
Reference in New Issue