From 63b9705e091b2895016d4dab98d301e5a3ee8b89 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 28 Dec 2013 10:04:15 -0700 Subject: [PATCH] comments --- builder/amazon/common/step_security_group.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builder/amazon/common/step_security_group.go b/builder/amazon/common/step_security_group.go index 38ee00804..1d95619fe 100644 --- a/builder/amazon/common/step_security_group.go +++ b/builder/amazon/common/step_security_group.go @@ -60,6 +60,9 @@ func (s *StepSecurityGroup) Run(state multistep.StateBag) multistep.StepAction { }, } + // We loop and retry this a few times because sometimes the security + // group isn't available immediately because AWS resources are eventaully + // consistent. ui.Say("Authorizing SSH access on the temporary security group...") for i := 0; i < 5; i++ { _, err = ec2conn.AuthorizeSecurityGroup(groupResp.SecurityGroup, perms)