read in the environment variables that government wait time and polling time for the AWS wait in step_stop_ebs_volume

This commit is contained in:
Megan Marsh 2018-07-12 14:30:44 -07:00
parent 460e39d05d
commit b6b907f523
1 changed files with 5 additions and 3 deletions

View File

@ -78,9 +78,11 @@ func (s *StepStopEBSBackedInstance) Run(ctx context.Context, state multistep.Sta
// Wait for the instance to actually stop
ui.Say("Waiting for the instance to stop...")
err = ec2conn.WaitUntilInstanceStoppedWithContext(ctx, &ec2.DescribeInstancesInput{
InstanceIds: []*string{instance.InstanceId},
})
err = ec2conn.WaitUntilInstanceStoppedWithContext(ctx,
&ec2.DescribeInstancesInput{
InstanceIds: []*string{instance.InstanceId},
},
getWaiterOptions()...)
if err != nil {
err := fmt.Errorf("Error waiting for instance to stop: %s", err)