Commit b95ad0c2 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/amazon/all: launched instances have a name [GH-642]

parent 4c6800f5
......@@ -23,6 +23,8 @@ IMPROVEMENTS:
* core: Plugins communicate over a single TCP connection per plugin now,
instead of sometimes dozens. Performance around plugin communication
dramatically increased.
* builder/amazon/all: Launched EC2 instances now have a name of
"Packer Builder" so that they are easily recognizable. [GH-642]
* builder/amazon/all: Copying AMIs to multiple regions now happens
in parallel. [GH-495]
* builder/qemu: Floppy files are supported. [GH-686]
......
......@@ -6,7 +6,6 @@ import (
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"io/ioutil"
"log"
)
type StepRunSourceInstance struct {
......@@ -91,7 +90,14 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
}
s.instance = &runResp.Instances[0]
log.Printf("instance id: %s", s.instance.InstanceId)
ui.Message(fmt.Sprintf("Instance ID: %s", s.instance.InstanceId))
_, err = ec2conn.CreateTags(
[]string{s.instance.InstanceId}, []ec2.Tag{{"Name", "Packer Builder"}})
if err != nil {
ui.Message(
fmt.Sprintf("Failed to tag a Name on the builder instance: %s", err))
}
ui.Say(fmt.Sprintf("Waiting for instance (%s) to become ready...", s.instance.InstanceId))
stateChange := StateChangeConf{
......
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