add proper error handling for tagging source instance

This commit is contained in:
Roman Zhuzha 2017-01-18 14:02:10 +01:00
parent ae016a1f25
commit d9186dc8cf

View File

@ -302,8 +302,10 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
Resources: []*string{instance.InstanceId}, Resources: []*string{instance.InstanceId},
}) })
if err != nil { if err != nil {
ui.Message( err := fmt.Errorf("Error tagging source instance: %s", err)
fmt.Sprintf("Failed to tag a Name on the builder instance: %s", err)) state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
} }
if s.Debug { if s.Debug {