From b69239e7f82fc2ef2d8c4e42212ca7bbd3b54b65 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Wed, 7 Jan 2015 13:28:15 -0800 Subject: [PATCH] command/meta: Adding additional nil guards --- command/meta.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/meta.go b/command/meta.go index 0b04a93366..e22f61bcea 100644 --- a/command/meta.go +++ b/command/meta.go @@ -109,7 +109,7 @@ func (m *Meta) Context(copts contextOpts) (*terraform.Context, bool, error) { // Check if remote state is enabled, but do not refresh. // Since a plan is supposed to lock-in the changes, we do not // attempt a state refresh. - if plan.State.Remote != nil && plan.State.Remote.Type != "" { + if plan != nil && plan.State != nil && plan.State.Remote != nil && plan.State.Remote.Type != "" { log.Printf("[INFO] Enabling remote state from plan") m.useRemoteState = true }