From 96b53cc06cfea37cc20f837d71f999095b8219e4 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 25 Jun 2015 15:29:46 -0700 Subject: [PATCH] command: ask for input even if tfvars is set [GH-2161] --- command/meta.go | 2 +- command/meta_test.go | 2 +- command/push_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/meta.go b/command/meta.go index b469ecb5e8..1a6ca47f45 100644 --- a/command/meta.go +++ b/command/meta.go @@ -190,7 +190,7 @@ func (m *Meta) InputMode() terraform.InputMode { var mode terraform.InputMode mode |= terraform.InputModeProvider - if len(m.variables) == 0 && m.autoKey == "" { + if len(m.variables) == 0 { mode |= terraform.InputModeVar mode |= terraform.InputModeVarUnset } diff --git a/command/meta_test.go b/command/meta_test.go index bb3b34107d..23b817203a 100644 --- a/command/meta_test.go +++ b/command/meta_test.go @@ -158,7 +158,7 @@ func TestMetaInputMode_defaultVars(t *testing.T) { t.Fatalf("err: %s", err) } - if m.InputMode()&terraform.InputModeVar != 0 { + if m.InputMode()&terraform.InputModeVar == 0 { t.Fatalf("bad: %#v", m.InputMode()) } } diff --git a/command/push_test.go b/command/push_test.go index ccb7bc2229..96ed37d4e0 100644 --- a/command/push_test.go +++ b/command/push_test.go @@ -119,7 +119,7 @@ func TestPush_input(t *testing.T) { "foo": "foo", } if !reflect.DeepEqual(client.UpsertOptions.Variables, variables) { - t.Fatalf("bad: %#v", client.UpsertOptions) + t.Fatalf("bad: %#v", client.UpsertOptions.Variables) } }