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

This commit is contained in:
Adrien Delorme 2019-09-27 12:57:55 +02:00 committed by GitHub
parent c722009159
commit 07e97e26de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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":