diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go index 9ed8752ba..7e8627095 100644 --- a/builder/amazon/common/step_run_source_instance.go +++ b/builder/amazon/common/step_run_source_instance.go @@ -93,6 +93,10 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi } instanceId = []string{runResp.Instances[0].InstanceId} } else { + ui.Message(fmt.Sprintf( + "Requesting spot instance '%s' for: %s", + s.InstanceType, s.SpotPrice)) + runOpts := &ec2.RequestSpotInstances{ SpotPrice: s.SpotPrice, KeyName: keyName, @@ -113,9 +117,11 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi ui.Error(err.Error()) return multistep.ActionHalt } + s.spotRequest = &runSpotResp.SpotRequestResults[0] + spotRequestId := s.spotRequest.SpotRequestId - ui.Say(fmt.Sprintf("Waiting for spot request (%s) to become ready...", spotRequestId)) + ui.Message(fmt.Sprintf("Waiting for spot request (%s) to become active...", spotRequestId)) stateChange := StateChangeConf{ Pending: []string{"open"}, Target: "active", diff --git a/builder/amazon/ebs/step_stop_instance.go b/builder/amazon/ebs/step_stop_instance.go index c266b46d4..09c19bddb 100644 --- a/builder/amazon/ebs/step_stop_instance.go +++ b/builder/amazon/ebs/step_stop_instance.go @@ -19,7 +19,6 @@ func (s *stepStopInstance) Run(state multistep.StateBag) multistep.StepAction { // Skip when it is a spot instance if s.SpotPrice != "" { - ui.Say(fmt.Sprintf("This is a spot instance, no need to stop for the AMI")) return multistep.ActionContinue }