mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #2502 from hashicorp/b-var-ask
command: ask for input even if tfvars is set [GH-2161]
This commit is contained in:
commit
4ff8f94fd6
@ -190,7 +190,7 @@ func (m *Meta) InputMode() terraform.InputMode {
|
|||||||
|
|
||||||
var mode terraform.InputMode
|
var mode terraform.InputMode
|
||||||
mode |= terraform.InputModeProvider
|
mode |= terraform.InputModeProvider
|
||||||
if len(m.variables) == 0 && m.autoKey == "" {
|
if len(m.variables) == 0 {
|
||||||
mode |= terraform.InputModeVar
|
mode |= terraform.InputModeVar
|
||||||
mode |= terraform.InputModeVarUnset
|
mode |= terraform.InputModeVarUnset
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ func TestMetaInputMode_defaultVars(t *testing.T) {
|
|||||||
t.Fatalf("err: %s", err)
|
t.Fatalf("err: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if m.InputMode()&terraform.InputModeVar != 0 {
|
if m.InputMode()&terraform.InputModeVar == 0 {
|
||||||
t.Fatalf("bad: %#v", m.InputMode())
|
t.Fatalf("bad: %#v", m.InputMode())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ func TestPush_input(t *testing.T) {
|
|||||||
"foo": "foo",
|
"foo": "foo",
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(client.UpsertOptions.Variables, variables) {
|
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