step_run_source_instance.go: make sure we use the right ShouldRetry error

pull/8165/head
Adrien Delorme 7 years ago committed by GitHub
parent c722009159
commit 07e97e26de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -206,7 +206,7 @@ func (s *StepRunSourceInstance) Run(ctx context.Context, state multistep.StateBa
var r *ec2.DescribeInstancesOutput
err = retry.Config{
Tries: 11,
ShouldRetry: func(error) bool {
ShouldRetry: func(err error) bool {
if awsErr, ok := err.(awserr.Error); ok {
switch awsErr.Code() {
case "InvalidInstanceID.NotFound":

Loading…
Cancel
Save