From 586cab11ee1440e85bc09cef381caafe241a94d4 Mon Sep 17 00:00:00 2001 From: Marcin Matlaszek Date: Fri, 26 Jun 2015 15:29:46 +0200 Subject: [PATCH] Fixes spot instance cleanup. --- builder/amazon/common/step_run_source_instance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go index 2150616c2..09b053901 100644 --- a/builder/amazon/common/step_run_source_instance.go +++ b/builder/amazon/common/step_run_source_instance.go @@ -296,7 +296,7 @@ func (s *StepRunSourceInstance) Cleanup(state multistep.StateBag) { if s.spotRequest != nil { ui.Say("Cancelling the spot request...") input := &ec2.CancelSpotInstanceRequestsInput{ - SpotInstanceRequestIDs: []*string{s.spotRequest.InstanceID}, + SpotInstanceRequestIDs: []*string{s.spotRequest.SpotInstanceRequestID}, } if _, err := ec2conn.CancelSpotInstanceRequests(input); err != nil { ui.Error(fmt.Sprintf("Error cancelling the spot request, may still be around: %s", err))