Merge pull request #2327 from emate/fix-for-spot-requests-cleanup

Fixes spot instance cleanup.
This commit is contained in:
Mitchell Hashimoto 2015-06-29 09:24:01 -07:00
commit 7b64723a11
1 changed files with 1 additions and 1 deletions

View File

@ -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))