From b6b907f523d366693442eac169982e50ee884d66 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 12 Jul 2018 14:30:44 -0700 Subject: [PATCH] read in the environment variables that government wait time and polling time for the AWS wait in step_stop_ebs_volume --- builder/amazon/common/step_stop_ebs_instance.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/builder/amazon/common/step_stop_ebs_instance.go b/builder/amazon/common/step_stop_ebs_instance.go index 184430b91..aee29b432 100644 --- a/builder/amazon/common/step_stop_ebs_instance.go +++ b/builder/amazon/common/step_stop_ebs_instance.go @@ -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)