Fix retry logic in AWS spot instance tagging

This commit is contained in:
Anssi Junnola 2020-12-15 17:12:32 +00:00 committed by Anssi Junnola
parent 72c1912b60
commit 82a25ec419

View File

@ -406,7 +406,7 @@ func (s *StepRunSpotInstance) Run(ctx context.Context, state multistep.StateBag)
}
// Retry creating tags for about 2.5 minutes
err = retry.Config{Tries: 11, ShouldRetry: func(error) bool {
err = retry.Config{Tries: 11, ShouldRetry: func(err error) bool {
if awserrors.Matches(err, "InvalidInstanceID.NotFound", "") {
return true
}