command/remote: Use PersistState

This commit is contained in:
Armon Dadgar 2014-10-09 16:36:37 -07:00 committed by Mitchell Hashimoto
parent 4e44443aa3
commit 1945e2099a
1 changed files with 1 additions and 6 deletions

View File

@ -180,12 +180,7 @@ func (c *RemoteCommand) initBlankState() int {
blank.Remote = &c.remoteConf blank.Remote = &c.remoteConf
// Persist the state // Persist the state
buf := bytes.NewBuffer(nil) if err := remote.PersistState(blank); err != nil {
if err := terraform.WriteState(blank, buf); err != nil {
c.Ui.Error(fmt.Sprintf("Failed to encode state: %v", err))
return 1
}
if err := remote.Persist(buf); err != nil {
c.Ui.Error(fmt.Sprintf("Failed to initialize state file: %v", err)) c.Ui.Error(fmt.Sprintf("Failed to initialize state file: %v", err))
return 1 return 1
} }