command: Meta provides the state output path

Armon Dadgar 12 years ago
parent ad4f92c7bc
commit 21bbc69010

@ -215,7 +215,7 @@ func (c *ApplyCommand) Run(args []string) int {
"infrastructure, so keep it safe. To inspect the complete state\n"+
"use the `terraform show` command.\n\n"+
"State path: %s",
c.Meta.stateOutPath)))
c.Meta.StateOutPath())))
}
// If we have outputs, then output those at the end.

@ -76,6 +76,16 @@ func (m *Meta) initStatePaths() {
}
}
// StateOutPath returns the true output path for the state file
func (m *Meta) StateOutPath() string {
m.initStatePaths()
if m.useRemoteState {
path, _ := remote.HiddenStatePath()
return path
}
return m.stateOutPath
}
// Colorize returns the colorization structure for a command.
func (m *Meta) Colorize() *colorstring.Colorize {
return &colorstring.Colorize{

Loading…
Cancel
Save