use amazon steps from master

This commit is contained in:
Matthew Hooker 2018-01-22 17:50:40 -08:00
parent aa667577a5
commit eafda52411
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 1 additions and 11 deletions

View File

@ -179,17 +179,7 @@ func (s *StepRunSourceInstance) Run(_ context.Context, state multistep.StateBag)
describeInstance := &ec2.DescribeInstancesInput{
InstanceIds: []*string{aws.String(instanceId)},
}
ctx, cancel := context.WithCancel(context.Background())
go func() {
for {
if _, ok := state.GetOk(multistep.StateCancelled); ok {
cancel()
}
}
}()
if err := ec2conn.WaitUntilInstanceRunningWithContext(ctx, describeInstance); err != nil {
if err := ec2conn.WaitUntilInstanceRunning(describeInstance); err != nil {
err := fmt.Errorf("Error waiting for instance (%s) to become ready: %s", instanceId, err)
state.Put("error", err)
ui.Error(err.Error())