mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
command: ask for input even if tfvars is set [GH-2161]
This commit is contained in:
parent
faa41c29b1
commit
96b53cc06c
@ -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
|
||||
}
|
||||
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user