core: Enable TestContext2Plan_movedResourceBasic

This is the first test exercising the basic functionality of config-driven
move. We previously had it skipped because Terraform's previous design
of treating all three of the state artifacts as mutable attributes of
terraform.Context meant that it was too late during planning to deal with
the move operations, and thus this test was failing.

Thanks to the previous commit, which changes the terraform.Context API
such that we can defer creating the three state artifacts until we're
already doing planning, this test now works and shows Terraform correctly
handling a resource that was formerly called "a" and is now called "b",
with a "moved" block recording that renaming.
This commit is contained in:
Martin Atkins 2021-08-27 16:52:14 -07:00
parent 89b05050ec
commit 7803f69d42
1 changed files with 0 additions and 2 deletions

View File

@ -701,8 +701,6 @@ provider "test" {
} }
func TestContext2Plan_movedResourceBasic(t *testing.T) { func TestContext2Plan_movedResourceBasic(t *testing.T) {
t.Skip("Context.Plan doesn't properly propagate moves into the prior state yet")
addrA := mustResourceInstanceAddr("test_object.a") addrA := mustResourceInstanceAddr("test_object.a")
addrB := mustResourceInstanceAddr("test_object.b") addrB := mustResourceInstanceAddr("test_object.b")
m := testModuleInline(t, map[string]string{ m := testModuleInline(t, map[string]string{