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:
parent
d4b0cb68e3
commit
d92e82c43f
|
@ -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))
|
ui.Say(fmt.Sprintf("Creating temporary keypair: %s", s.Comm.SSHTemporaryKeyPairName))
|
||||||
err := retry.Config{
|
err := retry.Config{
|
||||||
Tries: 11,
|
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 {
|
}.Run(ctx, func(ctx context.Context) error {
|
||||||
var err error
|
var err error
|
||||||
keyResp, err = ec2conn.CreateKeyPair(&ec2.CreateKeyPairInput{
|
keyResp, err = ec2conn.CreateKeyPair(&ec2.CreateKeyPairInput{
|
||||||
|
|
Loading…
Reference in New Issue