From 1945e2099a64d9cd72b5bbcf0076dea5858e7333 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Thu, 9 Oct 2014 16:36:37 -0700 Subject: [PATCH] command/remote: Use PersistState --- command/remote.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/command/remote.go b/command/remote.go index a385aaea4..1faa1877c 100644 --- a/command/remote.go +++ b/command/remote.go @@ -180,12 +180,7 @@ func (c *RemoteCommand) initBlankState() int { blank.Remote = &c.remoteConf // Persist the state - buf := bytes.NewBuffer(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 { + if err := remote.PersistState(blank); err != nil { c.Ui.Error(fmt.Sprintf("Failed to initialize state file: %v", err)) return 1 }