abort if image import fails

This commit is contained in:
Megan Marsh 2018-09-20 11:44:37 -07:00
parent 3f8407d95f
commit d616f0ba71
1 changed files with 6 additions and 0 deletions

View File

@ -217,6 +217,12 @@ func WaitForImageToBeImported(c *ec2.EC2, ctx aws.Context, input *ec2.DescribeIm
Argument: "ImportImageTasks[].Status",
Expected: "completed",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch,
Argument: "ImportImageTasks[].Status",
Expected: "deleted",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {