Merge pull request #6601 from hashicorp/fix_6536

Increase waiter timeout for AWS WaitUntilImageAvailable command
This commit is contained in:
Megan Marsh
2018-08-24 09:35:58 -07:00
committed by GitHub
+7 -1
View File
@@ -40,10 +40,16 @@ func WaitUntilAMIAvailable(ctx aws.Context, conn *ec2.EC2, imageId string) error
ImageIds: []*string{&imageId},
}
waitOpts := getWaiterOptions()
if len(waitOpts) == 0 {
// Bump this default to 30 minutes because the aws default
// of ten minutes doesn't work for some of our long-running copies.
waitOpts = append(waitOpts, request.WithWaiterMaxAttempts(120))
}
err := conn.WaitUntilImageAvailableWithContext(
ctx,
&imageInput,
getWaiterOptions()...)
waitOpts...)
return err
}