From 7803f69d42c7ccedc962da308a4d1e033cacb0dd Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 27 Aug 2021 16:52:14 -0700 Subject: [PATCH] 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. --- internal/terraform/context_plan2_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/terraform/context_plan2_test.go b/internal/terraform/context_plan2_test.go index 08796a3c1..53053feda 100644 --- a/internal/terraform/context_plan2_test.go +++ b/internal/terraform/context_plan2_test.go @@ -701,8 +701,6 @@ provider "test" { } 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") addrB := mustResourceInstanceAddr("test_object.b") m := testModuleInline(t, map[string]string{