command/apply: cleaner output

This commit is contained in:
Mitchell Hashimoto 2014-07-13 09:20:27 -07:00
parent 9b090a5505
commit 4bc00fa047
2 changed files with 10 additions and 2 deletions

View File

@ -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
}

View File

@ -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()))
}