This commit is contained in:
Mitchell Hashimoto 2013-12-28 10:04:15 -07:00
parent 8204944c0e
commit 5c7e7daac9
1 changed files with 3 additions and 0 deletions

View File

@ -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...") ui.Say("Authorizing SSH access on the temporary security group...")
for i := 0; i < 5; i++ { for i := 0; i < 5; i++ {
_, err = ec2conn.AuthorizeSecurityGroup(groupResp.SecurityGroup, perms) _, err = ec2conn.AuthorizeSecurityGroup(groupResp.SecurityGroup, perms)