From 3bf88e2dd7f65d9f93ee0afc41c69ff73f4a5def Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 3 Aug 2013 16:38:21 -0700 Subject: [PATCH] builder/amazon/common: sleep between API calls for SSHAddr --- builder/amazon/common/ssh.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builder/amazon/common/ssh.go b/builder/amazon/common/ssh.go index a5ddf8fae..562c95658 100644 --- a/builder/amazon/common/ssh.go +++ b/builder/amazon/common/ssh.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/mitchellh/goamz/ec2" "github.com/mitchellh/packer/communicator/ssh" + "time" ) // SSHAddress returns a function that can be given to the SSH communicator @@ -35,6 +36,7 @@ func SSHAddress(e *ec2.EC2, port int) func(map[string]interface{}) (string, erro } state["instance"] = &r.Reservations[0].Instances[0] + time.Sleep(1 * time.Second) } return "", errors.New("couldn't determine IP address for instance")