refactor: replace the maxBackoff from 30 nanosecond to 30 seconds

Co-Authored-By: Adrien Delorme <azr@users.noreply.github.com>
This commit is contained in:
Pratyush Singhal 2019-06-11 15:58:02 +05:30 committed by Pratyush singhal
parent d4b0cb68e3
commit d92e82c43f
1 changed files with 1 additions and 1 deletions

View File

@ -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{