command: UiHook outputs for diffs

This commit is contained in:
Mitchell Hashimoto 2014-06-26 17:18:46 -07:00
parent ae6b85e11b
commit 23de2fc2f3
1 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,12 @@ type UiHook struct {
Ui cli.Ui
}
func (h *UiHook) PreDiff(
id string, s *terraform.ResourceState) (terraform.HookAction, error) {
h.Ui.Output(fmt.Sprintf("Calculating diff for %s", id))
return terraform.HookActionContinue, nil
}
func (h *UiHook) PreRefresh(
id string, s *terraform.ResourceState) (terraform.HookAction, error) {
h.Ui.Output(fmt.Sprintf("Refreshing state for %s (ID: %s)", id, s.ID))