From 4bc00fa047c91f270b14b173e94ca192d446da3a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 13 Jul 2014 09:20:27 -0700 Subject: [PATCH] command/apply: cleaner output --- command/apply.go | 10 +++++++++- command/format_state.go | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/command/apply.go b/command/apply.go index 4922db4fd4..1864d05930 100644 --- a/command/apply.go +++ b/command/apply.go @@ -120,7 +120,15 @@ func (c *ApplyCommand) Run(args []string) int { return 1 } - c.Ui.Output(FormatState(state, c.Colorize())) + c.Ui.Output(c.Colorize().Color(fmt.Sprintf( + "[reset][bold][green]\n"+ + "Apply succeeded! Infrastructure created and/or updated.\n"+ + "The state of your infrastructure has been saved to the path\n"+ + "below. This state is required to modify and destroy your\n"+ + "infrastructure, so keep it safe. To inspect the complete state\n"+ + "use the `terraform show` command.\n\n"+ + "State path: %s", + stateOutPath))) return 0 } diff --git a/command/format_state.go b/command/format_state.go index 59f02e5901..e05eadb505 100644 --- a/command/format_state.go +++ b/command/format_state.go @@ -78,5 +78,5 @@ func FormatState(s *terraform.State, c *colorstring.Colorize) string { } } - return strings.TrimSpace(buf.String()) + return strings.TrimSpace(c.Color(buf.String())) }