command: send the provisioner output to the prompt

This commit is contained in:
Mitchell Hashimoto 2014-10-04 16:33:47 -07:00
parent c52a21d680
commit c1fbf46a33
1 changed files with 12 additions and 0 deletions

View File

@ -164,6 +164,18 @@ func (h *UiHook) PreProvision(
return terraform.HookActionContinue, nil
}
func (h *UiHook) ProvisionOutput(
n *terraform.InstanceInfo,
provId string,
msg string) {
id := n.HumanId()
var buf bytes.Buffer
buf.WriteString(h.Colorize.Color(fmt.Sprintf(
"[reset]%s (%s): ", id, provId)))
buf.WriteString(msg)
h.ui.Output(buf.String())
}
func (h *UiHook) PreRefresh(
n *terraform.InstanceInfo,
s *terraform.InstanceState) (terraform.HookAction, error) {