builder/amazon-chroot: add description with time created snapshot

[GH-1388]
This commit is contained in:
Mitchell Hashimoto 2014-09-05 16:10:33 -07:00
parent c6243a2de7
commit c9cc82d89e
2 changed files with 7 additions and 1 deletions

View File

@ -55,6 +55,8 @@ BUG FIXES:
* core: SSH TCP keepalive period is now 5 seconds (shorter). [GH-1232]
* builder/amazon-chroot: Can properly build HVM images now. [GH-1360]
* builder/amazon-chroot: Fix crash in root device check. [GH-1360]
* builder/amazon-chroot: Add description that Packer made the snapshot
with a time. [GH-1388]
* builder/amazon-instance: Fix deprecation warning for `ec2-bundle-vol`
[GH-1424]
* builder/amazon-instance: Add `--no-filter` to the `ec2-bundle-vol`

View File

@ -3,6 +3,8 @@ package chroot
import (
"errors"
"fmt"
"time"
"github.com/mitchellh/goamz/ec2"
"github.com/mitchellh/multistep"
awscommon "github.com/mitchellh/packer/builder/amazon/common"
@ -23,7 +25,9 @@ func (s *StepSnapshot) Run(state multistep.StateBag) multistep.StepAction {
volumeId := state.Get("volume_id").(string)
ui.Say("Creating snapshot...")
createSnapResp, err := ec2conn.CreateSnapshot(volumeId, "")
createSnapResp, err := ec2conn.CreateSnapshot(
volumeId,
fmt.Sprintf("Packer: %s", time.Now().String()))
if err != nil {
err := fmt.Errorf("Error creating snapshot: %s", err)
state.Put("error", err)