From d92e82c43fcc2fbd5007d9a88174ef76f8207a9a Mon Sep 17 00:00:00 2001 From: Pratyush Singhal Date: Tue, 11 Jun 2019 15:58:02 +0530 Subject: [PATCH] refactor: replace the maxBackoff from 30 nanosecond to 30 seconds Co-Authored-By: Adrien Delorme --- builder/amazon/common/step_key_pair.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/amazon/common/step_key_pair.go b/builder/amazon/common/step_key_pair.go index a5a2fffd8..631226ab3 100644 --- a/builder/amazon/common/step_key_pair.go +++ b/builder/amazon/common/step_key_pair.go @@ -60,7 +60,7 @@ func (s *StepKeyPair) Run(ctx context.Context, state multistep.StateBag) multist ui.Say(fmt.Sprintf("Creating temporary keypair: %s", s.Comm.SSHTemporaryKeyPairName)) err := retry.Config{ Tries: 11, - RetryDelay: (&retry.Backoff{InitialBackoff: 200 * time.Millisecond, MaxBackoff: 30, Multiplier: 2}).Linear, + RetryDelay: (&retry.Backoff{InitialBackoff: 200 * time.Millisecond, MaxBackoff: 30 * time.Second, Multiplier: 2}).Linear, }.Run(ctx, func(ctx context.Context) error { var err error keyResp, err = ec2conn.CreateKeyPair(&ec2.CreateKeyPairInput{