add failing test for IgnoreAllChanges override
This commit is contained in:
parent
079aabb70e
commit
df6dad5070
|
@ -320,3 +320,13 @@ func TestModuleOverrideResourceFQNs(t *testing.T) {
|
|||
t.Fatalf("wrong result: found provider config ref %s, expected nil", got.ProviderConfigRef)
|
||||
}
|
||||
}
|
||||
|
||||
func TestModuleOverrideIgnoreAllChanges(t *testing.T) {
|
||||
mod, diags := testModuleFromDir("testdata/valid-modules/override-ignore-changes")
|
||||
assertNoDiagnostics(t, diags)
|
||||
|
||||
r := mod.ManagedResources["test_instance.foo"]
|
||||
if !r.Managed.IgnoreAllChanges {
|
||||
t.Fatalf("wrong result: expected r.Managed.IgnoreAllChanges to be true")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
resource "test_instance" "foo" {
|
||||
foo = "bar"
|
||||
}
|
6
internal/configs/testdata/valid-modules/override-ignore-changes/main_override.tf
vendored
Normal file
6
internal/configs/testdata/valid-modules/override-ignore-changes/main_override.tf
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
resource "test_instance" "foo" {
|
||||
foo = "bar"
|
||||
lifecycle {
|
||||
ignore_changes = all
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue