diff --git a/pkg/tests/detailed_diff_set_test.go b/pkg/tests/detailed_diff_set_test.go index 0e3a3edd7..d4d3b57f3 100644 --- a/pkg/tests/detailed_diff_set_test.go +++ b/pkg/tests/detailed_diff_set_test.go @@ -576,14 +576,12 @@ func TestDetailedDiffSet(t *testing.T) { for _, schemaValueMakerPair := range computedSchemaValueMakerPairs { t.Run(schemaValueMakerPair.name, func(t *testing.T) { - // TODO[pulumi/pulumi-terraform-bridge#2528] - t.Skipf("These tests are non-deterministic under the non-Accurate Previews bridge.") t.Parallel() for _, scenario := range scenarios { t.Run(scenario.name, func(t *testing.T) { t.Parallel() runTest( - t, schemaValueMakerPair.res, schemaValueMakerPair.valueMaker, scenario.initialValue, scenario.changeValue, true, + t, schemaValueMakerPair.res, schemaValueMakerPair.valueMaker, scenario.initialValue, scenario.changeValue, false, ) }) } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added.golden index a158c69ab..94f5561c4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added.golden @@ -27,17 +27,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_end.golden index a565c0f58..61e7023f4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_end.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_end_unordered.golden index 392cedd4d..9e8f02e21 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_end_unordered.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_front.golden index 4a9093619..3a2d9fcbb 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_front.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - + nested : "val1" - + nested : "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -71,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_front_unordered.golden index 4b861a07b..afed007f9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_front_unordered.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_middle.golden index 23515cd9a..d91143690 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_middle.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_middle_unordered.golden index d69dac3ff..77521f58f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_middle_unordered.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } + [2]: { + nested : "val1" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/changed_non-null.golden index 361b230e4..3c61d1ead 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/changed_non-null.golden @@ -35,12 +35,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - ~ nested: "value" => "value1" + ~ nested : "value" => "value1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/changed_null_to_non-null.golden index 997fcb140..7e7fdd2f0 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/changed_null_to_non-null.golden @@ -28,17 +28,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_end.golden index 68221b016..49a453315 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_end.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -71,7 +65,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_end_unordered.golden index 5acb84614..11c25ea19 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_end_unordered.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_front.golden index c16ed5210..7e9debb9f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_front.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - - nested : "val1" - - nested : "val1" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_front_unordered.golden index ed70beb68..c7b999d62 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_front_unordered.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - - nested : "val2" - - nested : "val2" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_middle.golden index 138961884..9c5e259b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_middle.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_middle_unordered.golden index 57b2df7c9..4c99be506 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/removed_middle_unordered.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - - nested : "val2" - - nested : "val2" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/same_element_updated.golden index 8f8c9ef6f..20af5dce4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/same_element_updated.golden @@ -56,13 +56,22 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - ~ nested: "val2" => "val4" + ~ nested : "val2" => "val4" + } + ~ [2]: { } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/same_element_updated_unordered.golden index ae4193a52..0daa3357d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/same_element_updated_unordered.golden @@ -56,11 +56,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + ~ nested : "val1" => "val2" + } ~ [1]: { - + nested: "val4" + ~ nested : "val2" => "val4" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ] Resources: @@ -68,7 +71,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_end.golden index 2eadb4582..63705da7b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_end.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } + [2]: { + nested : "val3" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_front.golden index 022dd5e75..41adc784d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_front.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val2" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_middle.golden index cfa39e13b..d66a47680 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_added_middle.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val1" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_end.golden index 4d56f9e12..27f6fd2e0 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_end.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_front.golden index 4f71f2d68..24e502d14 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_front.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -71,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_middle.golden index 7bbf952b0..37646faa5 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/shuffled_removed_middle.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added.golden index c9d713e4a..127e90847 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added.golden @@ -57,14 +57,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -78,8 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed.golden index 5db1ab177..888c08999 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed.golden @@ -66,11 +66,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } + ~ [1]: { + } ~ [2]: { - ~ nested: "val3" => "val5" + ~ nested : "val3" => "val5" } ~ [3]: { - ~ nested: "val4" => "val6" + ~ nested : "val4" => "val6" } ] Resources: @@ -78,7 +82,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden index eaf035ef1..45ad19c32 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -67,16 +67,16 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + nested: "val5" + ~ nested : "val1" => "val5" } ~ [1]: { - + nested: "val6" + ~ nested : "val2" => "val6" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -84,9 +84,13 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden index 46655ce21..447a94af5 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -66,14 +66,16 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -81,8 +83,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden index e2ec81282..76cb9ef06 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -68,14 +68,16 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -83,8 +85,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_removed.golden index 5b48bf818..b6f28b466 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/two_removed.golden @@ -57,14 +57,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -80,8 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added.golden index 010dd34da..1de9875a9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added.golden @@ -27,19 +27,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_end.golden index 4a1104507..9c1af455d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_end_unordered.golden index c6806e2fa..2fcfb24b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_end_unordered.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } + [2]: { + computed : "non-computed-val1" + nested : "val1" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_front.golden index 96f0da43b..24ebf3720 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_front.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val3" => "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" + + [0]: { + + computed : "non-computed-val1" + + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_front_unordered.golden index c3bbd0fc6..9477ea35b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_front_unordered.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" + + [0]: { + + computed : "non-computed-val2" + + nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_middle.golden index 3c64ef622..cb91ff477 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_middle.golden @@ -37,29 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val2" + + [1]: { + computed : "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" + + nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_middle_unordered.golden index 46f401911..3de19f40c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/added_middle_unordered.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" + + [1]: { + + computed : "non-computed-val3" + + nested : "val3" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/changed_non-null.golden index deda0b36d..3d40302c3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/changed_non-null.golden @@ -35,7 +35,7 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + computed: "non-computed-value1" + ~ computed: "non-computed-value" => "non-computed-value1" ~ nested : "value" => "value1" } ] @@ -44,7 +44,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/changed_null_to_non-null.golden index c29090ab0..e2326c566 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/changed_null_to_non-null.golden @@ -28,19 +28,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_end.golden index dd2eace84..27b631a62 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_end_unordered.golden index ee0ce6889..87c9ced14 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_end_unordered.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - - nested : "val1" - - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_front.golden index ac5d272c9..74c0f7468 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_front.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_front_unordered.golden index bead3fa83..d83c330b0 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_front_unordered.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - - nested : "val2" - - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_middle.golden index 0be377e38..7b3e9ce15 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_middle.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_middle_unordered.golden index b82831b93..8e95109d1 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/removed_middle_unordered.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/same_element_updated.golden index 18ccaf0e1..b4f76f7a7 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/same_element_updated.golden @@ -43,7 +43,7 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [1]: { - + computed: "non-computed-val4" + ~ computed: "non-computed-val2" => "non-computed-val4" ~ nested : "val2" => "val4" } ] @@ -52,7 +52,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/same_element_updated_unordered.golden index d8dacac7d..a3af8c6c3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/same_element_updated_unordered.golden @@ -42,12 +42,13 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val4" - + nested : "val4" + + [1]: { + + computed : "non-computed-val4" + + nested : "val4" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } ] Resources: @@ -55,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_end.golden index d19856bc1..cf125372c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_front.golden index 4e8fcf2fd..c8d7a3a0f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_front.golden @@ -37,29 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] + + [0]: { + computed : "non-computed-val1" - + computed : "non-computed-val1" - ~ nested : "val2" => "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val2" - + nested : "val2" + + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_middle.golden index 65cfe4c03..373c6cff9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_middle.golden @@ -37,30 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val2" + + [1]: { + computed : "non-computed-val2" + nested : "val2" - + nested : "val2" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_end.golden index 89ec557a0..9ec766ae5 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_front.golden index 6f56bacd6..1a4103a07 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_front.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - - nested : "val1" - - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_middle.golden index 719bc22e3..40b9ff67a 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_middle.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added.golden index d7e17ab74..353e54999 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added.golden @@ -42,16 +42,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -66,10 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[3].computed": map[string]interface{}{}, - "tests[3].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed.golden index 3a88622d6..d4593e7f3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed.golden @@ -53,11 +53,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [2]: { - + computed: "non-computed-val5" + ~ computed: "non-computed-val3" => "non-computed-val5" ~ nested : "val3" => "val5" } ~ [3]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val4" => "non-computed-val6" ~ nested : "val4" => "val6" } ] @@ -66,9 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].computed": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].computed": map[string]interface{}{}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden index fc06a3f3e..3c647ef4e 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -52,19 +52,21 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + computed: "non-computed-val5" - + nested : "val5" + + [0]: { + + computed : "non-computed-val5" + + nested : "val5" } - ~ [1]: { - + computed: "non-computed-val6" - + nested : "val6" + + [1]: { + + computed : "non-computed-val6" + + nested : "val6" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -72,11 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden index fcfab9f2a..5e4e96ab2 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -52,16 +52,17 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -69,10 +70,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden index a5d74b151..6b4b00e7a 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -54,16 +54,17 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -71,10 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_removed.golden index 9a701c40c..fa8851ce6 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new_computed_specified_in_program/two_removed.golden @@ -42,16 +42,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -66,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added.golden index a158c69ab..94f5561c4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added.golden @@ -27,17 +27,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_end.golden index a565c0f58..61e7023f4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_end.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_end_unordered.golden index 392cedd4d..9e8f02e21 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_end_unordered.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_front.golden index 51e6911fa..6c3c3e039 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_front.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_front_unordered.golden index 8ec3403e0..6d0830e4b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_front_unordered.golden @@ -52,15 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - + nested : "val2" - + nested : "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -71,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_middle.golden index a1f98590b..23cedb220 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_middle.golden @@ -52,15 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - + nested : "val2" - + nested : "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -71,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_middle_unordered.golden index d69dac3ff..22da1919d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/added_middle_unordered.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } + [2]: { + nested : "val1" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/changed_non-null.golden index 987ea5274..0170773e4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/changed_non-null.golden @@ -35,12 +35,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - ~ nested: "value" => "value1" + ~ nested : "value" => "value1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[0].nested": map[string]interface{}{"kind": "UPDATE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/changed_null_to_non-null.golden index 997fcb140..7e7fdd2f0 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/changed_null_to_non-null.golden @@ -28,17 +28,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_end.golden index 68221b016..49a453315 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_end.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -71,7 +65,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_end_unordered.golden index 5acb84614..27a71d3d4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_end_unordered.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_front.golden index aeb533478..f90856167 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_front.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_front_unordered.golden index 6291feb13..ecfe8e436 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_front_unordered.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_middle.golden index 63b0b8328..648c2e19c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_middle.golden @@ -52,15 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - - nested : "val2" - - nested : "val2" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -72,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_middle_unordered.golden index 43b325173..27f07f40c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/removed_middle_unordered.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/same_element_updated.golden index 8553ff787..ef4fe3047 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/same_element_updated.golden @@ -56,13 +56,22 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - ~ nested: "val2" => "val4" + ~ nested : "val2" => "val4" + } + ~ [2]: { } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[1].nested": map[string]interface{}{"kind": "UPDATE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/same_element_updated_unordered.golden index 6f93022a0..d683f9400 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/same_element_updated_unordered.golden @@ -56,11 +56,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + ~ nested : "val1" => "val2" + } ~ [1]: { - + nested: "val4" + ~ nested : "val2" => "val4" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ] Resources: @@ -68,7 +71,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_end.golden index 2eadb4582..f9fa4badc 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_end.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } + [2]: { + nested : "val3" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_front.golden index 022dd5e75..2803f4130 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_front.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val2" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_middle.golden index 464161d80..e1c8e2839 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_added_middle.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - + nested : "val2" - + nested : "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val1" @@ -71,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_end.golden index 4d56f9e12..97212ee45 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_end.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_front.golden index 618c3105f..d99c1f916 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_front.golden @@ -52,15 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - - nested : "val1" - - nested : "val1" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -72,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_middle.golden index 7bbf952b0..87c298f59 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/shuffled_removed_middle.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added.golden index c9d713e4a..127e90847 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added.golden @@ -57,14 +57,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -78,8 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed.golden index d1960c41a..78e89cb3f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed.golden @@ -66,11 +66,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } + ~ [1]: { + } ~ [2]: { - ~ nested: "val3" => "val5" + ~ nested : "val3" => "val5" } ~ [3]: { - ~ nested: "val4" => "val6" + ~ nested : "val4" => "val6" } ] Resources: @@ -78,7 +82,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden index 0da819e65..5c1cb78b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -67,16 +67,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + nested: "val5" + ~ nested : "val1" => "val5" } ~ [1]: { - + nested: "val6" + ~ nested : "val2" => "val6" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -84,9 +84,13 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].nested": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden index bfe054bd5..b733ba7f7 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -66,14 +66,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -81,8 +83,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden index 0422c994f..3ecef9514 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -68,14 +68,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -83,8 +85,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_removed.golden index 5b48bf818..b6f28b466 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new/two_removed.golden @@ -57,14 +57,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -80,8 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added.golden index d3a8d0090..1de9875a9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added.golden @@ -27,19 +27,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_end.golden index 2537b8701..9c1af455d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_end_unordered.golden index bc0019e30..2fcfb24b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_end_unordered.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } + [2]: { + computed : "non-computed-val1" + nested : "val1" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_front.golden index 6d228b6b5..24ebf3720 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_front.golden @@ -37,30 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] + + [0]: { + computed : "non-computed-val1" - + computed : "non-computed-val1" - + nested : "val1" + nested : "val1" } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val3" => "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" - } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_front_unordered.golden index 66e50a4b6..9477ea35b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_front_unordered.golden @@ -37,29 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] + + [0]: { + computed : "non-computed-val2" - + computed : "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" + + nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_middle.golden index 9f5a004f9..cb91ff477 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_middle.golden @@ -37,29 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val2" + + [1]: { + computed : "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" + + nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_middle_unordered.golden index 5978c757a..3de19f40c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/added_middle_unordered.golden @@ -37,30 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val3" + + [1]: { + computed : "non-computed-val3" + nested : "val3" - + nested : "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/changed_non-null.golden index 937e35569..89c888348 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/changed_non-null.golden @@ -35,7 +35,7 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + computed: "non-computed-value1" + ~ computed: "non-computed-value" => "non-computed-value1" ~ nested : "value" => "value1" } ] @@ -44,7 +44,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/changed_null_to_non-null.golden index 19284b182..e2326c566 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/changed_null_to_non-null.golden @@ -28,19 +28,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_end.golden index dd2eace84..27b631a62 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_end_unordered.golden index e64a0b61f..87c9ced14 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_end_unordered.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_front.golden index ac5d272c9..74c0f7468 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_front.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_front_unordered.golden index 103d51677..d83c330b0 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_front_unordered.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_middle.golden index 0be377e38..7b3e9ce15 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_middle.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_middle_unordered.golden index b82831b93..8e95109d1 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/removed_middle_unordered.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/same_element_updated.golden index 7826a7e15..f6696642d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/same_element_updated.golden @@ -43,7 +43,7 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [1]: { - + computed: "non-computed-val4" + ~ computed: "non-computed-val2" => "non-computed-val4" ~ nested : "val2" => "val4" } ] @@ -52,7 +52,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/same_element_updated_unordered.golden index 872ce993f..8a21d2bb9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/same_element_updated_unordered.golden @@ -42,12 +42,13 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val4" - + nested : "val4" + + [1]: { + + computed : "non-computed-val4" + + nested : "val4" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } ] Resources: @@ -55,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[1]": map[string]interface{}{}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_end.golden index dd9b3f77a..cf125372c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_front.golden index bde851fa1..c8d7a3a0f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_front.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val2" - + nested : "val2" + + [0]: { + + computed : "non-computed-val1" + + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_middle.golden index f876f9f5a..373c6cff9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_added_middle.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val3" => "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" + + [1]: { + + computed : "non-computed-val2" + + nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_end.golden index 89ec557a0..9ec766ae5 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_front.golden index 4010a99ab..1a4103a07 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_front.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_middle.golden index 2c4ae7228..40b9ff67a 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/shuffled_removed_middle.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - - nested : "val2" - - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added.golden index 155b1aaa8..353e54999 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added.golden @@ -42,16 +42,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -66,10 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[3].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed.golden index 82c38b150..fc533b2c3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed.golden @@ -53,11 +53,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [2]: { - + computed: "non-computed-val5" + ~ computed: "non-computed-val3" => "non-computed-val5" ~ nested : "val3" => "val5" } ~ [3]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val4" => "non-computed-val6" ~ nested : "val4" => "val6" } ] @@ -66,9 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].computed": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].computed": map[string]interface{}{}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden index 69a8d4cc6..95ac81c70 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -52,19 +52,21 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + computed: "non-computed-val5" - + nested : "val5" + + [0]: { + + computed : "non-computed-val5" + + nested : "val5" } - ~ [1]: { - + computed: "non-computed-val6" - + nested : "val6" + + [1]: { + + computed : "non-computed-val6" + + nested : "val6" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -72,11 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0]": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden index 0698328db..db9ebe90d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -52,16 +52,17 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -69,10 +70,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden index 02650c0b3..3e1d56263 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -54,16 +54,17 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -71,10 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_removed.golden index 9a701c40c..fa8851ce6 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_force_new_computed_specified_in_program/two_removed.golden @@ -42,16 +42,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -66,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added.golden index d81ce5dbf..8a0de2272 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added.golden @@ -27,17 +27,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_end.golden index 9e9371c91..f16128f51 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_end.golden @@ -52,14 +52,8 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_end_unordered.golden index 2d86755bf..ae509e972 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_end_unordered.golden @@ -52,14 +52,8 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_front.golden index 0bf721641..1ee158309 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_front.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_front_unordered.golden index a4b58c31d..485cf9314 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_front_unordered.golden @@ -52,15 +52,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - + nested : "val2" - + nested : "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -71,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_middle.golden index 09ea28405..be8c5fc65 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_middle.golden @@ -52,14 +52,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_middle_unordered.golden index 2a8b9afe2..5dcd42ada 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/added_middle_unordered.golden @@ -52,15 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - + nested : "val3" - + nested : "val3" + ~ nested : "val2" => "val3" } + [2]: { + nested : "val1" @@ -71,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/changed_non-null.golden index 987ea5274..0170773e4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/changed_non-null.golden @@ -35,12 +35,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - ~ nested: "value" => "value1" + ~ nested : "value" => "value1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[0].nested": map[string]interface{}{"kind": "UPDATE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/changed_null_to_non-null.golden index e0ea8b413..2672c4e43 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/changed_null_to_non-null.golden @@ -28,17 +28,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_end.golden index 87f9f6dae..cb5cf4ece 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_end.golden @@ -52,14 +52,8 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -71,7 +65,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_end_unordered.golden index 1055896ef..899c8114b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_end_unordered.golden @@ -52,15 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - - nested : "val1" - - nested : "val1" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_front.golden index cb186290c..f3b02f42d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_front.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_front_unordered.golden index e7b6acefb..c1f45d3dc 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_front_unordered.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_middle.golden index 4401f4e64..d799448f4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_middle.golden @@ -52,14 +52,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_middle_unordered.golden index 5a85c71e4..81b888971 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/removed_middle_unordered.golden @@ -52,15 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - - nested : "val2" - - nested : "val2" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/same_element_updated.golden index 8553ff787..ef4fe3047 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/same_element_updated.golden @@ -56,13 +56,22 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - ~ nested: "val2" => "val4" + ~ nested : "val2" => "val4" + } + ~ [2]: { } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[1].nested": map[string]interface{}{"kind": "UPDATE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/same_element_updated_unordered.golden index 6f93022a0..d683f9400 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/same_element_updated_unordered.golden @@ -56,11 +56,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + ~ nested : "val1" => "val2" + } ~ [1]: { - + nested: "val4" + ~ nested : "val2" => "val4" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ] Resources: @@ -68,7 +71,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_end.golden index 5478a0ca5..9b2ffd6ec 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_end.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } + [2]: { + nested : "val3" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_front.golden index 2b1e5d7a3..719761f3c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_front.golden @@ -52,14 +52,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val2" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_middle.golden index 5ee7dfc44..71fb4ed7f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_added_middle.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val1" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_end.golden index 5ed39ef69..2e433d674 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_end.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_front.golden index e7f3ba6ba..c04626257 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_front.golden @@ -52,14 +52,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -71,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_middle.golden index d919f7b3f..c3a451e7d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/shuffled_removed_middle.golden @@ -52,15 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - - nested : "val2" - - nested : "val2" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added.golden index fd82b7c38..1637ef233 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added.golden @@ -57,14 +57,8 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -78,8 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{}, - "tests[3].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, + "tests[3]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed.golden index d1960c41a..78e89cb3f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed.golden @@ -66,11 +66,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } + ~ [1]: { + } ~ [2]: { - ~ nested: "val3" => "val5" + ~ nested : "val3" => "val5" } ~ [3]: { - ~ nested: "val4" => "val6" + ~ nested : "val4" => "val6" } ] Resources: @@ -78,7 +82,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_no_overlaps.golden index 0da819e65..5c1cb78b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -67,16 +67,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + nested: "val5" + ~ nested : "val1" => "val5" } ~ [1]: { - + nested: "val6" + ~ nested : "val2" => "val6" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -84,9 +84,13 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].nested": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_one_overlaps.golden index bfe054bd5..b733ba7f7 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -66,14 +66,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -81,8 +83,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_with_duplicates.golden index 0422c994f..3ecef9514 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -68,14 +68,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -83,8 +85,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_removed.golden index 527e29777..6677548c8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace/two_removed.golden @@ -57,14 +57,8 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -80,8 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added.golden index 977b48730..9c107c39e 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added.golden @@ -27,19 +27,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_end.golden index bd615dbc7..66fbc1c2d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_end.golden @@ -37,16 +37,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_end_unordered.golden index 8ac10d7ba..698ac8437 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_end_unordered.golden @@ -37,16 +37,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } + [2]: { + computed : "non-computed-val1" + nested : "val1" @@ -56,9 +46,5 @@ Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_front.golden index 24d6356ba..9a8683764 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_front.golden @@ -37,29 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] + + [0]: { + computed : "non-computed-val1" - + computed : "non-computed-val1" - ~ nested : "val2" => "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val3" => "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" + + nested : "val1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_front_unordered.golden index 0956741d1..eb66a56e2 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_front_unordered.golden @@ -37,30 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] + + [0]: { + computed : "non-computed-val2" - + computed : "non-computed-val2" - + nested : "val2" + nested : "val2" } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" - } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_middle.golden index 467bddbf3..3fa147fc4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_middle.golden @@ -37,28 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val3" => "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" + + [1]: { + + computed : "non-computed-val2" + + nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_middle_unordered.golden index 64ffdb1dd..7742de733 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/added_middle_unordered.golden @@ -37,28 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" + + [1]: { + + computed : "non-computed-val3" + + nested : "val3" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/changed_non-null.golden index 937e35569..89c888348 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/changed_non-null.golden @@ -35,7 +35,7 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + computed: "non-computed-value1" + ~ computed: "non-computed-value" => "non-computed-value1" ~ nested : "value" => "value1" } ] @@ -44,7 +44,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/changed_null_to_non-null.golden index c3c4c613b..238c8dba3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/changed_null_to_non-null.golden @@ -28,19 +28,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_end.golden index c4e647b16..101d829f4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_end.golden @@ -37,16 +37,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_end_unordered.golden index 3980f69fd..d3921213c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_end_unordered.golden @@ -37,28 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - - nested : "val1" - - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_front.golden index 9d6646a13..95cec62f9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_front.golden @@ -37,27 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_front_unordered.golden index 9599ad0d9..4ce1bb1bb 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_front_unordered.golden @@ -37,27 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_middle.golden index f71199b0c..e27759e65 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_middle.golden @@ -37,27 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_middle_unordered.golden index d6cf8f6b0..71aca2ff6 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/removed_middle_unordered.golden @@ -37,27 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/same_element_updated.golden index 7826a7e15..f6696642d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/same_element_updated.golden @@ -43,7 +43,7 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [1]: { - + computed: "non-computed-val4" + ~ computed: "non-computed-val2" => "non-computed-val4" ~ nested : "val2" => "val4" } ] @@ -52,7 +52,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/same_element_updated_unordered.golden index 872ce993f..8a21d2bb9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/same_element_updated_unordered.golden @@ -42,12 +42,13 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val4" - + nested : "val4" + + [1]: { + + computed : "non-computed-val4" + + nested : "val4" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } ] Resources: @@ -55,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[1]": map[string]interface{}{}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_end.golden index 132460d2b..ae58b0bcc 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_end.golden @@ -37,16 +37,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_front.golden index feb999495..c73db179d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_front.golden @@ -37,30 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] + + [0]: { + computed : "non-computed-val1" - + computed : "non-computed-val1" - + nested : "val1" + nested : "val1" } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val2" - + nested : "val2" - } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_middle.golden index 18d02a84b..ccd82694b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_added_middle.golden @@ -37,30 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val2" + + [1]: { + computed : "non-computed-val2" + nested : "val2" - + nested : "val2" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_end.golden index d77c8d76f..8741a83c6 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_end.golden @@ -37,16 +37,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_front.golden index a29fac8b0..e0d9d13c4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_front.golden @@ -37,28 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - - nested : "val1" - - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_middle.golden index ec309f6e7..19dd48fb4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/shuffled_removed_middle.golden @@ -37,28 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - - nested : "val2" - - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added.golden index a31604233..e43424e12 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added.golden @@ -42,16 +42,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -66,10 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{}, - "tests[3].computed": map[string]interface{}{}, - "tests[3].nested": map[string]interface{}{}, + "tests[2]": map[string]interface{}{}, + "tests[3]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed.golden index 82c38b150..fc533b2c3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed.golden @@ -53,11 +53,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [2]: { - + computed: "non-computed-val5" + ~ computed: "non-computed-val3" => "non-computed-val5" ~ nested : "val3" => "val5" } ~ [3]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val4" => "non-computed-val6" ~ nested : "val4" => "val6" } ] @@ -66,9 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].computed": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].computed": map[string]interface{}{}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden index 69a8d4cc6..95ac81c70 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -52,19 +52,21 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + computed: "non-computed-val5" - + nested : "val5" + + [0]: { + + computed : "non-computed-val5" + + nested : "val5" } - ~ [1]: { - + computed: "non-computed-val6" - + nested : "val6" + + [1]: { + + computed : "non-computed-val6" + + nested : "val6" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -72,11 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0]": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden index 0698328db..db9ebe90d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -52,16 +52,17 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -69,10 +70,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden index 02650c0b3..3e1d56263 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -54,16 +54,17 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -71,10 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_removed.golden index 87b713faa..b811014c9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_no_replace_computed_specified_in_program/two_removed.golden @@ -42,16 +42,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -66,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added.golden index a158c69ab..94f5561c4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added.golden @@ -27,17 +27,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_end.golden index a565c0f58..61e7023f4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_end.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_end_unordered.golden index 392cedd4d..9e8f02e21 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_end_unordered.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_front.golden index 51e6911fa..6c3c3e039 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_front.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_front_unordered.golden index 8ec3403e0..6d0830e4b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_front_unordered.golden @@ -52,15 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - + nested : "val2" - + nested : "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -71,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_middle.golden index a1f98590b..23cedb220 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_middle.golden @@ -52,15 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - + nested : "val2" - + nested : "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -71,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_middle_unordered.golden index b8e8de7c7..22da1919d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/added_middle_unordered.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - + nested : "val3" - + nested : "val3" + ~ nested : "val2" => "val3" } + [2]: { + nested : "val1" @@ -71,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_non-null.golden index 987ea5274..0170773e4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_non-null.golden @@ -35,12 +35,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - ~ nested: "value" => "value1" + ~ nested : "value" => "value1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[0].nested": map[string]interface{}{"kind": "UPDATE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_non-null_to_null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_non-null_to_null.golden index dd1027697..5164e9405 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_non-null_to_null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_non-null_to_null.golden @@ -34,18 +34,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. - nested : "value" } ] - - tests: [ - - [0]: { - - computed: "" - - nested : "value" - } - ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_null_to_non-null.golden index 997fcb140..7e7fdd2f0 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/changed_null_to_non-null.golden @@ -28,17 +28,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed.golden index 71d8b3dba..be31441b2 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed.golden @@ -29,18 +29,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - - [0]: { - - computed: "" - - nested : "value" - } + - tests: [ + - [0]: { + - computed: "" + - nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_end.golden index 68221b016..49a453315 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_end.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -71,7 +65,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_end_unordered.golden index 5acb84614..27a71d3d4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_end_unordered.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_front.golden index aeb533478..f90856167 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_front.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_front_unordered.golden index ed70beb68..ecfe8e436 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_front_unordered.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - - nested : "val2" - - nested : "val2" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_middle.golden index 63b0b8328..648c2e19c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_middle.golden @@ -52,15 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - - nested : "val2" - - nested : "val2" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -72,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_middle_unordered.golden index 57b2df7c9..27f07f40c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/removed_middle_unordered.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - - nested : "val2" - - nested : "val2" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/same_element_updated.golden index 8553ff787..ef4fe3047 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/same_element_updated.golden @@ -56,13 +56,22 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - ~ nested: "val2" => "val4" + ~ nested : "val2" => "val4" + } + ~ [2]: { } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[1].nested": map[string]interface{}{"kind": "UPDATE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/same_element_updated_unordered.golden index 6f93022a0..d683f9400 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/same_element_updated_unordered.golden @@ -56,11 +56,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + ~ nested : "val1" => "val2" + } ~ [1]: { - + nested: "val4" + ~ nested : "val2" => "val4" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ] Resources: @@ -68,7 +71,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_end.golden index 2eadb4582..f9fa4badc 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_end.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } + [2]: { + nested : "val3" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_front.golden index 022dd5e75..2803f4130 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_front.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val2" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_middle.golden index cfa39e13b..e1c8e2839 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_added_middle.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val1" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_end.golden index 4d56f9e12..97212ee45 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_end.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_front.golden index 4f71f2d68..d99c1f916 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_front.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -71,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_middle.golden index 7bbf952b0..87c298f59 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/shuffled_removed_middle.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added.golden index c9d713e4a..127e90847 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added.golden @@ -57,14 +57,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -78,8 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed.golden index d1960c41a..78e89cb3f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed.golden @@ -66,11 +66,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } + ~ [1]: { + } ~ [2]: { - ~ nested: "val3" => "val5" + ~ nested : "val3" => "val5" } ~ [3]: { - ~ nested: "val4" => "val6" + ~ nested : "val4" => "val6" } ] Resources: @@ -78,7 +82,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden index 0da819e65..5c1cb78b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -67,16 +67,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + nested: "val5" + ~ nested : "val1" => "val5" } ~ [1]: { - + nested: "val6" + ~ nested : "val2" => "val6" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -84,9 +84,13 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].nested": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden index bfe054bd5..b733ba7f7 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -66,14 +66,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -81,8 +83,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden index 0422c994f..3ecef9514 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -68,14 +68,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -83,8 +85,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_removed.golden index 5b48bf818..b6f28b466 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new/two_removed.golden @@ -57,14 +57,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -80,8 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added.golden index d3a8d0090..1de9875a9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added.golden @@ -27,19 +27,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_end.golden index 2537b8701..9c1af455d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_end_unordered.golden index bc0019e30..2fcfb24b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_end_unordered.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } + [2]: { + computed : "non-computed-val1" + nested : "val1" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_front.golden index 6d228b6b5..24ebf3720 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_front.golden @@ -37,30 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] + + [0]: { + computed : "non-computed-val1" - + computed : "non-computed-val1" - + nested : "val1" + nested : "val1" } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val3" => "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" - } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_front_unordered.golden index fb7c1953f..9477ea35b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_front_unordered.golden @@ -37,30 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] + + [0]: { + computed : "non-computed-val2" - + computed : "non-computed-val2" - + nested : "val2" + nested : "val2" } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" - } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_middle.golden index a27bd03e6..cb91ff477 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_middle.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val3" => "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" + + [1]: { + + computed : "non-computed-val2" + + nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_middle_unordered.golden index 5978c757a..3de19f40c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/added_middle_unordered.golden @@ -37,30 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val3" + + [1]: { + computed : "non-computed-val3" + nested : "val3" - + nested : "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_non-null.golden index 937e35569..89c888348 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_non-null.golden @@ -35,7 +35,7 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + computed: "non-computed-value1" + ~ computed: "non-computed-value" => "non-computed-value1" ~ nested : "value" => "value1" } ] @@ -44,7 +44,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_non-null_to_null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_non-null_to_null.golden index 080b510f2..e1cbce612 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_non-null_to_null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_non-null_to_null.golden @@ -34,18 +34,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. - nested : "value" } ] - - tests: [ - - [0]: { - - computed: "non-computed-value" - - nested : "value" - } - ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_null_to_non-null.golden index 19284b182..e2326c566 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/changed_null_to_non-null.golden @@ -28,19 +28,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed.golden index 8e2c54cd3..ea57b6068 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed.golden @@ -29,18 +29,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - - [0]: { - - computed: "non-computed-value" - - nested : "value" - } + - tests: [ + - [0]: { + - computed: "non-computed-value" + - nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_end.golden index dd2eace84..27b631a62 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_end_unordered.golden index ee0ce6889..87c9ced14 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_end_unordered.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - - nested : "val1" - - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_front.golden index ac5d272c9..74c0f7468 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_front.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_front_unordered.golden index 103d51677..d83c330b0 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_front_unordered.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_middle.golden index e2a2ef357..7b3e9ce15 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_middle.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - - nested : "val2" - - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_middle_unordered.golden index b82831b93..8e95109d1 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/removed_middle_unordered.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/same_element_updated.golden index 7826a7e15..f6696642d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/same_element_updated.golden @@ -43,7 +43,7 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [1]: { - + computed: "non-computed-val4" + ~ computed: "non-computed-val2" => "non-computed-val4" ~ nested : "val2" => "val4" } ] @@ -52,7 +52,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/same_element_updated_unordered.golden index 872ce993f..8a21d2bb9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/same_element_updated_unordered.golden @@ -42,12 +42,13 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val4" - + nested : "val4" + + [1]: { + + computed : "non-computed-val4" + + nested : "val4" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } ] Resources: @@ -55,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[1]": map[string]interface{}{}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_end.golden index dd9b3f77a..cf125372c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_front.golden index bde851fa1..c8d7a3a0f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_front.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val2" - + nested : "val2" + + [0]: { + + computed : "non-computed-val1" + + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_middle.golden index 134ecf653..373c6cff9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_added_middle.golden @@ -37,30 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val2" + + [1]: { + computed : "non-computed-val2" + nested : "val2" - + nested : "val2" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_end.golden index 89ec557a0..9ec766ae5 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_front.golden index 6f56bacd6..1a4103a07 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_front.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - - nested : "val1" - - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_middle.golden index 719bc22e3..40b9ff67a 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/shuffled_removed_middle.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added.golden index 155b1aaa8..353e54999 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added.golden @@ -42,16 +42,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -66,10 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[3].computed": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed.golden index 82c38b150..fc533b2c3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed.golden @@ -53,11 +53,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [2]: { - + computed: "non-computed-val5" + ~ computed: "non-computed-val3" => "non-computed-val5" ~ nested : "val3" => "val5" } ~ [3]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val4" => "non-computed-val6" ~ nested : "val4" => "val6" } ] @@ -66,9 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].computed": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].computed": map[string]interface{}{}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden index 69a8d4cc6..95ac81c70 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -52,19 +52,21 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + computed: "non-computed-val5" - + nested : "val5" + + [0]: { + + computed : "non-computed-val5" + + nested : "val5" } - ~ [1]: { - + computed: "non-computed-val6" - + nested : "val6" + + [1]: { + + computed : "non-computed-val6" + + nested : "val6" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -72,11 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0]": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden index 0698328db..db9ebe90d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -52,16 +52,17 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -69,10 +70,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden index 02650c0b3..3e1d56263 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -54,16 +54,17 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -71,10 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_removed.golden index 9a701c40c..fa8851ce6 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_force_new_computed_specified_in_program/two_removed.golden @@ -42,16 +42,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -66,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added.golden index a158c69ab..94f5561c4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added.golden @@ -27,17 +27,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_end.golden index a565c0f58..61e7023f4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_end.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_end_unordered.golden index 392cedd4d..9e8f02e21 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_end_unordered.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_front.golden index 51e6911fa..3a2d9fcbb 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_front.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_front_unordered.golden index 4b861a07b..afed007f9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_front_unordered.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_middle.golden index 23515cd9a..d91143690 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_middle.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_middle_unordered.golden index d69dac3ff..77521f58f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/added_middle_unordered.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } + [2]: { + nested : "val1" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_non-null.golden index 361b230e4..3c61d1ead 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_non-null.golden @@ -35,12 +35,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - ~ nested: "value" => "value1" + ~ nested : "value" => "value1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_non-null_to_null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_non-null_to_null.golden index dd1027697..5164e9405 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_non-null_to_null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_non-null_to_null.golden @@ -34,18 +34,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. - nested : "value" } ] - - tests: [ - - [0]: { - - computed: "" - - nested : "value" - } - ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_null_to_non-null.golden index 997fcb140..7e7fdd2f0 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/changed_null_to_non-null.golden @@ -28,17 +28,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed.golden index 71d8b3dba..be31441b2 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed.golden @@ -29,18 +29,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - - [0]: { - - computed: "" - - nested : "value" - } + - tests: [ + - [0]: { + - computed: "" + - nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_end.golden index 68221b016..49a453315 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_end.golden @@ -52,14 +52,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -71,7 +65,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_end_unordered.golden index 11331cb48..11c25ea19 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_end_unordered.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - - nested : "val1" - - nested : "val1" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_front.golden index aeb533478..7e9debb9f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_front.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_front_unordered.golden index ed70beb68..c7b999d62 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_front_unordered.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - - nested : "val2" - - nested : "val2" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_middle.golden index 138961884..9c5e259b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_middle.golden @@ -52,14 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_middle_unordered.golden index 57b2df7c9..4c99be506 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/removed_middle_unordered.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - - nested : "val2" - - nested : "val2" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/same_element_updated.golden index 8f8c9ef6f..20af5dce4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/same_element_updated.golden @@ -56,13 +56,22 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - ~ nested: "val2" => "val4" + ~ nested : "val2" => "val4" + } + ~ [2]: { } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/same_element_updated_unordered.golden index ae4193a52..0daa3357d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/same_element_updated_unordered.golden @@ -56,11 +56,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + ~ nested : "val1" => "val2" + } ~ [1]: { - + nested: "val4" + ~ nested : "val2" => "val4" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ] Resources: @@ -68,7 +71,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_end.golden index 2eadb4582..63705da7b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_end.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } + [2]: { + nested : "val3" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_front.golden index d29859dd3..41adc784d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_front.golden @@ -52,15 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - + nested : "val1" - + nested : "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val2" @@ -71,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_middle.golden index 464161d80..d66a47680 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_added_middle.golden @@ -52,15 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - + nested : "val2" - + nested : "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val1" @@ -71,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_end.golden index 4d56f9e12..27f6fd2e0 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_end.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_front.golden index 618c3105f..24e502d14 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_front.golden @@ -52,15 +52,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - - nested : "val1" - - nested : "val1" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -72,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_middle.golden index 7bbf952b0..37646faa5 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/shuffled_removed_middle.golden @@ -52,14 +52,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added.golden index c9d713e4a..127e90847 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added.golden @@ -57,14 +57,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -78,8 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed.golden index 5db1ab177..888c08999 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed.golden @@ -66,11 +66,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } + ~ [1]: { + } ~ [2]: { - ~ nested: "val3" => "val5" + ~ nested : "val3" => "val5" } ~ [3]: { - ~ nested: "val4" => "val6" + ~ nested : "val4" => "val6" } ] Resources: @@ -78,7 +82,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden index eaf035ef1..45ad19c32 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -67,16 +67,16 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + nested: "val5" + ~ nested : "val1" => "val5" } ~ [1]: { - + nested: "val6" + ~ nested : "val2" => "val6" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -84,9 +84,13 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden index 46655ce21..447a94af5 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -66,14 +66,16 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -81,8 +83,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden index e2ec81282..76cb9ef06 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -68,14 +68,16 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -83,8 +85,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_removed.golden index 5b48bf818..b6f28b466 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new/two_removed.golden @@ -57,14 +57,8 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -80,8 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added.golden index 010dd34da..1de9875a9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added.golden @@ -27,19 +27,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_end.golden index 4a1104507..9c1af455d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_end_unordered.golden index c6806e2fa..2fcfb24b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_end_unordered.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } + [2]: { + computed : "non-computed-val1" + nested : "val1" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_front.golden index 96f0da43b..24ebf3720 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_front.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val3" => "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" + + [0]: { + + computed : "non-computed-val1" + + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_front_unordered.golden index c3bbd0fc6..9477ea35b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_front_unordered.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" + + [0]: { + + computed : "non-computed-val2" + + nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_middle.golden index 3c64ef622..cb91ff477 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_middle.golden @@ -37,29 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val2" + + [1]: { + computed : "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" + + nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_middle_unordered.golden index e422f9e1c..3de19f40c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/added_middle_unordered.golden @@ -37,29 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val3" + + [1]: { + computed : "non-computed-val3" - ~ nested : "val2" => "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" + + nested : "val3" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_non-null.golden index deda0b36d..3d40302c3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_non-null.golden @@ -35,7 +35,7 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + computed: "non-computed-value1" + ~ computed: "non-computed-value" => "non-computed-value1" ~ nested : "value" => "value1" } ] @@ -44,7 +44,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_non-null_to_null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_non-null_to_null.golden index 080b510f2..e1cbce612 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_non-null_to_null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_non-null_to_null.golden @@ -34,18 +34,9 @@ Plan: 1 to add, 0 to change, 1 to destroy. - nested : "value" } ] - - tests: [ - - [0]: { - - computed: "non-computed-value" - - nested : "value" - } - ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_null_to_non-null.golden index c29090ab0..e2326c566 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/changed_null_to_non-null.golden @@ -28,19 +28,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed.golden index 8e2c54cd3..ea57b6068 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed.golden @@ -29,18 +29,15 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - - [0]: { - - computed: "non-computed-value" - - nested : "value" - } + - tests: [ + - [0]: { + - computed: "non-computed-value" + - nested : "value" + } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_end.golden index dd2eace84..27b631a62 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_end_unordered.golden index e64a0b61f..87c9ced14 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_end_unordered.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_front.golden index b249fec28..74c0f7468 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_front.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - - nested : "val1" - - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_front_unordered.golden index 103d51677..d83c330b0 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_front_unordered.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_middle.golden index 0be377e38..7b3e9ce15 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_middle.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_middle_unordered.golden index 5d5100875..8e95109d1 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/removed_middle_unordered.golden @@ -37,28 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - - nested : "val2" - - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/same_element_updated.golden index 18ccaf0e1..b4f76f7a7 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/same_element_updated.golden @@ -43,7 +43,7 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [1]: { - + computed: "non-computed-val4" + ~ computed: "non-computed-val2" => "non-computed-val4" ~ nested : "val2" => "val4" } ] @@ -52,7 +52,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/same_element_updated_unordered.golden index d8dacac7d..a3af8c6c3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/same_element_updated_unordered.golden @@ -42,12 +42,13 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val4" - + nested : "val4" + + [1]: { + + computed : "non-computed-val4" + + nested : "val4" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } ] Resources: @@ -55,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_end.golden index d19856bc1..cf125372c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_front.golden index 4e8fcf2fd..c8d7a3a0f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_front.golden @@ -37,29 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] + + [0]: { + computed : "non-computed-val1" - + computed : "non-computed-val1" - ~ nested : "val2" => "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val2" - + nested : "val2" + + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_middle.golden index 65cfe4c03..373c6cff9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_added_middle.golden @@ -37,30 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val2" + + [1]: { + computed : "non-computed-val2" + nested : "val2" - + nested : "val2" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_end.golden index 89ec557a0..9ec766ae5 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_end.golden @@ -37,16 +37,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_front.golden index 4010a99ab..1a4103a07 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_front.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_middle.golden index 719bc22e3..40b9ff67a 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/shuffled_removed_middle.golden @@ -37,27 +37,14 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added.golden index d7e17ab74..353e54999 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added.golden @@ -42,16 +42,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -66,10 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[3].computed": map[string]interface{}{}, - "tests[3].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed.golden index 3a88622d6..d4593e7f3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed.golden @@ -53,11 +53,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [2]: { - + computed: "non-computed-val5" + ~ computed: "non-computed-val3" => "non-computed-val5" ~ nested : "val3" => "val5" } ~ [3]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val4" => "non-computed-val6" ~ nested : "val4" => "val6" } ] @@ -66,9 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].computed": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].computed": map[string]interface{}{}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden index fc06a3f3e..3c647ef4e 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -52,19 +52,21 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + computed: "non-computed-val5" - + nested : "val5" + + [0]: { + + computed : "non-computed-val5" + + nested : "val5" } - ~ [1]: { - + computed: "non-computed-val6" - + nested : "val6" + + [1]: { + + computed : "non-computed-val6" + + nested : "val6" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -72,11 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden index fcfab9f2a..5e4e96ab2 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -52,16 +52,17 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -69,10 +70,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden index a5d74b151..6b4b00e7a 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -54,16 +54,17 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -71,10 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{"kind": "ADD_REPLACE"}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_removed.golden index 9a701c40c..fa8851ce6 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_and_nested_force_new_computed_specified_in_program/two_removed.golden @@ -42,16 +42,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -66,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added.golden index d81ce5dbf..8a0de2272 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added.golden @@ -27,17 +27,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_end.golden index 9e9371c91..f16128f51 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_end.golden @@ -52,14 +52,8 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_end_unordered.golden index 2d86755bf..ae509e972 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_end_unordered.golden @@ -52,14 +52,8 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -70,7 +64,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_front.golden index 2dec5beda..1ee158309 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_front.golden @@ -52,15 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - + nested : "val1" - + nested : "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -71,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_front_unordered.golden index a4b58c31d..485cf9314 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_front_unordered.golden @@ -52,15 +52,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - + nested : "val2" - + nested : "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val1" @@ -71,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_middle.golden index 09ea28405..be8c5fc65 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_middle.golden @@ -52,14 +52,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val3" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_middle_unordered.golden index f75806561..5dcd42ada 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/added_middle_unordered.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } + [2]: { + nested : "val1" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_non-null.golden index 987ea5274..0170773e4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_non-null.golden @@ -35,12 +35,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - ~ nested: "value" => "value1" + ~ nested : "value" => "value1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[0].nested": map[string]interface{}{"kind": "UPDATE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_non-null_to_null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_non-null_to_null.golden index 06572af53..07629a3e3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_non-null_to_null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_non-null_to_null.golden @@ -34,18 +34,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. - nested : "value" } ] - - tests: [ - - [0]: { - - computed: "" - - nested : "value" - } - ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_null_to_non-null.golden index e0ea8b413..2672c4e43 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/changed_null_to_non-null.golden @@ -28,17 +28,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + nested : "value" - } + + tests: [ + + [0]: { + + nested : "value" + } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed.golden index 4af194aa6..9d2c980b9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed.golden @@ -29,18 +29,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - - [0]: { - - computed: "" - - nested : "value" - } + - tests: [ + - [0]: { + - computed: "" + - nested : "value" + } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_end.golden index 87f9f6dae..cb5cf4ece 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_end.golden @@ -52,14 +52,8 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -71,7 +65,8 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_end_unordered.golden index 1055896ef..899c8114b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_end_unordered.golden @@ -52,15 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - - nested : "val1" - - nested : "val1" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -72,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_front.golden index cb186290c..f3b02f42d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_front.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_front_unordered.golden index e7b6acefb..c1f45d3dc 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_front_unordered.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_middle.golden index 4401f4e64..d799448f4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_middle.golden @@ -52,14 +52,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val3" + ~ nested : "val2" => "val3" } - [2]: { - computed: "" @@ -71,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_middle_unordered.golden index a5bab14b5..81b888971 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/removed_middle_unordered.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/same_element_updated.golden index 8553ff787..ef4fe3047 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/same_element_updated.golden @@ -56,13 +56,22 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - ~ nested: "val2" => "val4" + ~ nested : "val2" => "val4" + } + ~ [2]: { } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{"tests[1].nested": map[string]interface{}{"kind": "UPDATE"}}, + detailedDiff: map[string]interface{}{ + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/same_element_updated_unordered.golden index 6f93022a0..d683f9400 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/same_element_updated_unordered.golden @@ -56,11 +56,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + ~ nested : "val1" => "val2" + } ~ [1]: { - + nested: "val4" + ~ nested : "val2" => "val4" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ] Resources: @@ -68,7 +71,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_end.golden index 5478a0ca5..9b2ffd6ec 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_end.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } + [2]: { + nested : "val3" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_front.golden index 2b1e5d7a3..719761f3c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_front.golden @@ -52,14 +52,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val3" } + [2]: { + nested : "val2" @@ -70,7 +65,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_middle.golden index 5ee7dfc44..71fb4ed7f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_added_middle.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val3" => "val2" + ~ nested : "val3" => "val2" } + [2]: { + nested : "val1" @@ -70,7 +66,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_end.golden index 5ed39ef69..2e433d674 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_end.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val2" + ~ nested : "val1" => "val2" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_front.golden index df47e9bc1..c04626257 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_front.golden @@ -52,15 +52,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - - nested : "val1" - - nested : "val1" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -72,7 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_middle.golden index 09094597e..c3a451e7d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/shuffled_removed_middle.golden @@ -52,14 +52,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - ~ nested : "val1" => "val3" + ~ nested : "val1" => "val3" } ~ [1]: { - + __defaults: [] - - computed : "" - ~ nested : "val2" => "val1" + ~ nested : "val2" => "val1" } - [2]: { - computed: "" @@ -71,7 +67,10 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added.golden index fd82b7c38..1637ef233 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added.golden @@ -57,14 +57,8 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } + [2]: { + nested : "val3" @@ -78,8 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{}, - "tests[3].nested": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{}, + "tests[3]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed.golden index d1960c41a..78e89cb3f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed.golden @@ -66,11 +66,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } + ~ [1]: { + } ~ [2]: { - ~ nested: "val3" => "val5" + ~ nested : "val3" => "val5" } ~ [3]: { - ~ nested: "val4" => "val6" + ~ nested : "val4" => "val6" } ] Resources: @@ -78,7 +82,11 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_no_overlaps.golden index 0da819e65..5c1cb78b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -67,16 +67,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + nested: "val5" + ~ nested : "val1" => "val5" } ~ [1]: { - + nested: "val6" + ~ nested : "val2" => "val6" } ~ [2]: { - - nested: "val3" + ~ nested : "val3" => "val1" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -84,9 +84,13 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].nested": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_one_overlaps.golden index bfe054bd5..b733ba7f7 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -66,14 +66,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -81,8 +83,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_with_duplicates.golden index 0422c994f..3ecef9514 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -68,14 +68,16 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + ~ [0]: { + } ~ [1]: { - + nested: "val5" + ~ nested : "val2" => "val5" } ~ [2]: { - ~ nested: "val3" => "val6" + ~ nested : "val3" => "val6" } ~ [3]: { - - nested: "val4" + ~ nested : "val4" => "val2" } ] Resources: @@ -83,8 +85,12 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_removed.golden index 527e29777..6677548c8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace/two_removed.golden @@ -57,14 +57,8 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + __defaults: [] - - computed : "" - nested : "val1" } ~ [1]: { - + __defaults: [] - - computed : "" - nested : "val2" } - [2]: { - computed: "" @@ -80,8 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added.golden index 977b48730..9c107c39e 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added.golden @@ -27,19 +27,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_end.golden index bd615dbc7..66fbc1c2d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_end.golden @@ -37,16 +37,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_end_unordered.golden index 8ac10d7ba..698ac8437 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_end_unordered.golden @@ -37,16 +37,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } + [2]: { + computed : "non-computed-val1" + nested : "val1" @@ -56,9 +46,5 @@ Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_front.golden index 7d4f5ae29..9a8683764 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_front.golden @@ -37,28 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val3" => "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" + + [0]: { + + computed : "non-computed-val1" + + nested : "val1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_front_unordered.golden index 0956741d1..eb66a56e2 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_front_unordered.golden @@ -37,30 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] + + [0]: { + computed : "non-computed-val2" - + computed : "non-computed-val2" - + nested : "val2" + nested : "val2" } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" - } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_middle.golden index 92ea8b9a9..3fa147fc4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_middle.golden @@ -37,29 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val2" + + [1]: { + computed : "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val3" - + nested : "val3" + + nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_middle_unordered.golden index cd3fb5c60..7742de733 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/added_middle_unordered.golden @@ -37,29 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - + computed : "non-computed-val3" + + [1]: { + computed : "non-computed-val3" - ~ nested : "val2" => "val3" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" + + nested : "val3" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_non-null.golden index 937e35569..89c888348 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_non-null.golden @@ -35,7 +35,7 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [0]: { - + computed: "non-computed-value1" + ~ computed: "non-computed-value" => "non-computed-value1" ~ nested : "value" => "value1" } ] @@ -44,7 +44,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, + "tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[0].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_non-null_to_null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_non-null_to_null.golden index fb113c062..6d83e6015 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_non-null_to_null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_non-null_to_null.golden @@ -34,18 +34,9 @@ Plan: 0 to add, 1 to change, 0 to destroy. - nested : "value" } ] - - tests: [ - - [0]: { - - computed: "non-computed-value" - - nested : "value" - } - ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_null_to_non-null.golden index c3c4c613b..238c8dba3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/changed_null_to_non-null.golden @@ -28,19 +28,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: { - + computed : "non-computed-value" - + nested : "value" - } + + tests: [ + + [0]: { + + computed : "non-computed-value" + + nested : "value" + } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed.golden index c307daceb..5246ebfdc 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed.golden @@ -29,18 +29,15 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - - [0]: { - - computed: "non-computed-value" - - nested : "value" - } + - tests: [ + - [0]: { + - computed: "non-computed-value" + - nested : "value" + } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_end.golden index c4e647b16..101d829f4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_end.golden @@ -37,16 +37,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_end_unordered.golden index 61e59b598..d3921213c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_end_unordered.golden @@ -37,27 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_front.golden index 9d6646a13..95cec62f9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_front.golden @@ -37,27 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_front_unordered.golden index 6f0eda196..4ce1bb1bb 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_front_unordered.golden @@ -37,28 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - - nested : "val2" - - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_middle.golden index f71199b0c..e27759e65 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_middle.golden @@ -37,27 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val3" - ~ nested : "val2" => "val3" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_middle_unordered.golden index d6cf8f6b0..71aca2ff6 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/removed_middle_unordered.golden @@ -37,27 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/same_element_updated.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/same_element_updated.golden index 7826a7e15..f6696642d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/same_element_updated.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/same_element_updated.golden @@ -43,7 +43,7 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [1]: { - + computed: "non-computed-val4" + ~ computed: "non-computed-val2" => "non-computed-val4" ~ nested : "val2" => "val4" } ] @@ -52,7 +52,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, + "tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[1].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/same_element_updated_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/same_element_updated_unordered.golden index 872ce993f..8a21d2bb9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/same_element_updated_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/same_element_updated_unordered.golden @@ -42,12 +42,13 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val4" - + nested : "val4" + + [1]: { + + computed : "non-computed-val4" + + nested : "val4" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } ] Resources: @@ -55,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[1]": map[string]interface{}{}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_end.golden index 132460d2b..ae58b0bcc 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_end.golden @@ -37,16 +37,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -56,9 +46,5 @@ Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_front.golden index 0da4b33b7..c73db179d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_front.golden @@ -37,28 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val3" - nested : "val3" - } - + [2]: { - + computed : "non-computed-val2" - + nested : "val2" + + [0]: { + + computed : "non-computed-val1" + + nested : "val1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_middle.golden index ad9d03af2..ccd82694b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_added_middle.golden @@ -37,28 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val3" => "non-computed-val2" - ~ nested : "val3" => "val2" - } - + [2]: { - + computed : "non-computed-val1" - + nested : "val1" + + [1]: { + + computed : "non-computed-val2" + + nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_end.golden index d77c8d76f..8741a83c6 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_end.golden @@ -37,16 +37,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val2" - ~ nested : "val1" => "val2" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - ~ nested : "val2" => "val1" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -56,8 +46,5 @@ Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_front.golden index 4e7951394..e0d9d13c4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_front.golden @@ -37,27 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [0]: { + - computed: "non-computed-val1" + - nested : "val1" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_middle.golden index ec309f6e7..19dd48fb4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/shuffled_removed_middle.golden @@ -37,28 +37,14 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - ~ computed : "non-computed-val1" => "non-computed-val3" - ~ nested : "val1" => "val3" - } - ~ [1]: { - + __defaults: [] - ~ computed : "non-computed-val2" => "non-computed-val1" - - nested : "val2" - - nested : "val2" - } - - [2]: { - - computed: "non-computed-val3" - - nested : "val3" + - [1]: { + - computed: "non-computed-val2" + - nested : "val2" } ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1].nested": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added.golden index a31604233..e43424e12 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added.golden @@ -42,16 +42,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } + [2]: { + computed : "non-computed-val3" + nested : "val3" @@ -66,10 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].computed": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{}, - "tests[3].computed": map[string]interface{}{}, - "tests[3].nested": map[string]interface{}{}, + "tests[2]": map[string]interface{}{}, + "tests[3]": map[string]interface{}{}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed.golden index 82c38b150..fc533b2c3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed.golden @@ -53,11 +53,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ ~ [2]: { - + computed: "non-computed-val5" + ~ computed: "non-computed-val3" => "non-computed-val5" ~ nested : "val3" => "val5" } ~ [3]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val4" => "non-computed-val6" ~ nested : "val4" => "val6" } ] @@ -66,9 +66,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[2].computed": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].computed": map[string]interface{}{}, + "tests[3].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[3].nested": map[string]interface{}{"kind": "UPDATE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden index 69a8d4cc6..95ac81c70 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_no_overlaps.golden @@ -52,19 +52,21 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + computed: "non-computed-val5" - + nested : "val5" + + [0]: { + + computed : "non-computed-val5" + + nested : "val5" } - ~ [1]: { - + computed: "non-computed-val6" - + nested : "val6" + + [1]: { + + computed : "non-computed-val6" + + nested : "val6" } - ~ [2]: { - - nested: "val3" + - [2]: { + - computed: "non-computed-val3" + - nested : "val3" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -72,11 +74,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[0].computed": map[string]interface{}{}, - "tests[0].nested": map[string]interface{}{}, - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[0]": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden index 0698328db..db9ebe90d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_one_overlaps.golden @@ -52,16 +52,17 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -69,10 +70,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden index 02650c0b3..3e1d56263 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_added_and_two_removed_shuffled,_with_duplicates.golden @@ -54,16 +54,17 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [1]: { - + computed: "non-computed-val5" - + nested : "val5" + + [1]: { + + computed : "non-computed-val5" + + nested : "val5" } ~ [2]: { - + computed: "non-computed-val6" + ~ computed: "non-computed-val3" => "non-computed-val6" ~ nested : "val3" => "val6" } - ~ [3]: { - - nested: "val4" + - [3]: { + - computed: "non-computed-val4" + - nested : "val4" } ] Resources: @@ -71,10 +72,9 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests[1].computed": map[string]interface{}{}, - "tests[1].nested": map[string]interface{}{}, - "tests[2].computed": map[string]interface{}{}, + "tests[1]": map[string]interface{}{}, + "tests[2].computed": map[string]interface{}{"kind": "UPDATE"}, "tests[2].nested": map[string]interface{}{"kind": "UPDATE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_removed.golden index 87b713faa..b811014c9 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/block_with_nested_computed_no_replace_computed_specified_in_program/two_removed.golden @@ -42,16 +42,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: { - + __defaults: [] - computed : "non-computed-val1" - nested : "val1" - } - ~ [1]: { - + __defaults: [] - computed : "non-computed-val2" - nested : "val2" - } - [2]: { - computed: "non-computed-val3" - nested : "val3" @@ -66,8 +56,7 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2].nested": map[string]interface{}{"kind": "DELETE"}, - "tests[3].nested": map[string]interface{}{"kind": "DELETE"}, + "tests[2]": map[string]interface{}{"kind": "DELETE"}, + "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added.golden index 44684c9c0..954d6936d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added.golden @@ -25,15 +25,12 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: "value" + + tests: [ + + [0]: "value" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_end.golden index b04db903d..efb765e14 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_end.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - [1]: "val2" + [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_end_unordered.golden index 6cd1a3ddf..aab9107ec 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_end_unordered.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val2" - [1]: "val3" + [2]: "val1" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_front.golden index 16378fe0f..31e792da5 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_front.golden @@ -35,15 +35,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + [0]: "val1" - ~ [1]: "val3" => "val2" - + [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_front_unordered.golden index 2b17069ac..759b13ab8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_front_unordered.golden @@ -35,15 +35,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + [0]: "val2" - [1]: "val3" - + [2]: "val1" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_middle.golden index e47ff4ca4..fcbd5e43e 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_middle.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" + [1]: "val2" - + [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_middle_unordered.golden index a0a743823..981c53f8d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/added_middle_unordered.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val2" - ~ [1]: "val2" => "val3" - + [2]: "val1" + + [1]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/changed_null_to_non-null.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/changed_null_to_non-null.golden index 0618402b0..e16ea5c7e 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/changed_null_to_non-null.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/changed_null_to_non-null.golden @@ -26,15 +26,12 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - + [0]: "value" + + tests: [ + + [0]: "value" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed.golden index b20cd705d..60aaba5dd 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed.golden @@ -27,15 +27,12 @@ Plan: 1 to add, 0 to change, 1 to destroy. +-crossprovider:index/testRes:TestRes: (replace) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - - [0]: "value" + - tests: [ + - [0]: "value" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_end.golden index d048eb2d6..778429a10 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_end.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - [1]: "val2" - [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_end_unordered.golden index 539ed7a05..ba2e33837 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_end_unordered.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val2" - ~ [1]: "val2" => "val3" - - [2]: "val3" + - [0]: "val1" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_front.golden index 6505f6e2d..559e88f3c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_front.golden @@ -35,15 +35,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - ~ [1]: "val2" => "val3" - - [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_front_unordered.golden index bac8997fb..66fb90e78 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_front_unordered.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val3" - [1]: "val2" - - [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_middle.golden index 22cecff1e..89b2548c5 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_middle.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - ~ [1]: "val2" => "val3" - - [2]: "val3" + - [1]: "val2" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_middle_unordered.golden index 0d6727f21..a34fe9f43 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/removed_middle_unordered.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val3" - [1]: "val2" - - [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_end.golden index 7246d3b71..83c54b25e 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_end.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val2" - ~ [1]: "val2" => "val1" + [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_front.golden index 040884012..062d80a9d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_front.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val2" => "val1" - [1]: "val3" - + [2]: "val2" + + [0]: "val1" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_middle.golden index f97ac234d..4ba476ddf 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_added_middle.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val3" + [1]: "val2" - + [2]: "val1" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_end.golden index d6389fc41..65bf2f44a 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_end.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val2" - ~ [1]: "val2" => "val1" - [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_front.golden index adef78984..73f5630f4 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_front.golden @@ -35,15 +35,10 @@ Plan: 1 to add, 0 to change, 1 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - [1]: "val2" - - [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_middle.golden index 094edb8b3..adb70ea2c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/shuffled_removed_middle.golden @@ -34,16 +34,11 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val3" - [1]: "val2" - - [2]: "val3" ] Resources: +-1 to replace 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE_REPLACE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/two_added.golden index 5a407b628..fd567fa7b 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/two_added.golden @@ -36,8 +36,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - [1]: "val2" + [2]: "val3" + [3]: "val4" ] @@ -46,7 +44,6 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, "tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, "tests[3]": map[string]interface{}{"kind": "ADD_REPLACE"}, }, diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/two_removed.golden index 22e4887c2..c52a70c37 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_force_new/two_removed.golden @@ -36,8 +36,6 @@ Plan: 1 to add, 0 to change, 1 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - [1]: "val2" - [2]: "val3" - [3]: "val4" ] @@ -46,7 +44,6 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, "tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"}, "tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"}, }, diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_end.golden index 63e949dc8..7ee2106a7 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_end.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - [1]: "val2" + [2]: "val3" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2]": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_end_unordered.golden index a5e7f1163..8c4222156 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_end_unordered.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val2" - [1]: "val3" + [2]: "val1" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2]": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_front.golden index 5fc53232b..8895df583 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_front.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val2" => "val1" - ~ [1]: "val3" => "val2" - + [2]: "val3" + + [0]: "val1" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_front_unordered.golden index 4c38e2071..cf5ded15a 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_front_unordered.golden @@ -35,15 +35,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ + [0]: "val2" - [1]: "val3" - + [2]: "val1" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_middle.golden index 5410e9230..39cae1691 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_middle.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - ~ [1]: "val3" => "val2" - + [2]: "val3" + + [1]: "val2" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_middle_unordered.golden index 238744944..4c15c514f 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/added_middle_unordered.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val2" + [1]: "val3" - + [2]: "val1" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/changed_null_to_empty.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/changed_null_to_empty.golden index a7fcf786b..30ad73965 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/changed_null_to_empty.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/changed_null_to_empty.golden @@ -24,15 +24,12 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - - [0]: "computed" + - tests: [ + - [0]: "computed" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed.golden index 3b1edecb5..f19c6593e 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed.golden @@ -27,15 +27,12 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - - [0]: "value" + - tests: [ + - [0]: "value" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_end.golden index ac32abffb..853195eb7 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_end.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - [1]: "val2" - [2]: "val3" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_end_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_end_unordered.golden index cb1c7f496..c542534f7 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_end_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_end_unordered.golden @@ -35,15 +35,10 @@ Plan: 0 to add, 1 to change, 0 to destroy. [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - ~ [1]: "val2" => "val3" - - [2]: "val3" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_front.golden index d5ea8c1f7..451cac3b8 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_front.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val2" - ~ [1]: "val2" => "val3" - - [2]: "val3" + - [0]: "val1" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_front_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_front_unordered.golden index d13426087..da0f3d3ce 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_front_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_front_unordered.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val3" - ~ [1]: "val2" => "val1" - - [2]: "val3" + - [1]: "val2" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_middle.golden index 8f01d65b5..9af564bb3 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_middle.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - [1]: "val2" - - [2]: "val3" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_middle_unordered.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_middle_unordered.golden index 211d395bc..28fd761cf 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_middle_unordered.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/removed_middle_unordered.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val3" - [1]: "val2" - - [2]: "val3" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_end.golden index 03af2319a..40c2fe45c 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_end.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val2" - ~ [1]: "val2" => "val1" + [2]: "val3" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2]": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_front.golden index ca2ef2a89..9827f1c99 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_front.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val2" => "val1" - [1]: "val3" - + [2]: "val2" + + [0]: "val1" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_middle.golden index 5882c3611..249ad9570 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_added_middle.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val3" + [1]: "val2" - + [2]: "val1" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_end.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_end.golden index b67995138..a7b63e504 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_end.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_end.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val2" - ~ [1]: "val2" => "val1" - [2]: "val3" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[2]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_front.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_front.golden index 892afd8cf..6ca7784ef 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_front.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_front.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val3" - [1]: "val2" - - [2]: "val3" + - [0]: "val1" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_middle.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_middle.golden index 27655d21d..f55f66baa 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_middle.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/shuffled_removed_middle.golden @@ -34,16 +34,11 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - ~ [0]: "val1" => "val3" - [1]: "val2" - - [2]: "val3" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[1]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/two_added.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/two_added.golden index ef86e923f..e79983b61 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/two_added.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/two_added.golden @@ -36,8 +36,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - [1]: "val2" + [2]: "val3" + [3]: "val4" ] @@ -46,7 +44,6 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, "tests[2]": map[string]interface{}{}, "tests[3]": map[string]interface{}{}, }, diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/two_removed.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/two_removed.golden index 51d8c4e23..f97ddf92d 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/two_removed.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/two_removed.golden @@ -36,8 +36,6 @@ Plan: 0 to add, 1 to change, 0 to destroy. [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] ~ tests: [ - [0]: "val1" - [1]: "val2" - [2]: "val3" - [3]: "val4" ] @@ -46,7 +44,6 @@ Resources: 1 unchanged `, detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, "tests[2]": map[string]interface{}{"kind": "DELETE"}, "tests[3]": map[string]interface{}{"kind": "DELETE"}, }, diff --git a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/unchanged_empty.golden b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/unchanged_empty.golden index caf3e767c..ee393acc7 100644 --- a/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/unchanged_empty.golden +++ b/pkg/tests/testdata/TestDetailedDiffSet/computed_attribute_no_force_new/unchanged_empty.golden @@ -25,15 +25,12 @@ Plan: 0 to add, 1 to change, 0 to destroy. ~ crossprovider:index/testRes:TestRes: (update) [id=id] [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] - ~ tests: [ - - [0]: "computed" + - tests: [ + - [0]: "computed" ] Resources: ~ 1 to update 1 unchanged `, - detailedDiff: map[string]interface{}{ - "tests": map[string]interface{}{"kind": "UPDATE"}, - "tests[0]": map[string]interface{}{"kind": "DELETE"}, - }, + detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "DELETE"}}, } diff --git a/pkg/tfbridge/detailed_diff.go b/pkg/tfbridge/detailed_diff.go index c6f0d56dc..66987b831 100644 --- a/pkg/tfbridge/detailed_diff.go +++ b/pkg/tfbridge/detailed_diff.go @@ -5,11 +5,14 @@ import ( "context" "fmt" "slices" + "sort" + "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/common/resource" "github.com/pulumi/pulumi/sdk/v3/go/common/util/contract" pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go" + "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info" shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim" "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/walk" "github.com/pulumi/pulumi-terraform-bridge/v3/unstable/propertyvalue" @@ -154,6 +157,103 @@ func makeBaseDiff(old, new resource.PropertyValue) baseDiff { return undecidedDiff } +// validInputsFromPlan returns true if the given plan property value could originate from the given inputs. +// Under the hood, it walks the plan and the inputs and checks that all differences stem from computed properties. +// Any differences coming from properties which are not computed will be rejected. +// Note that we are relying on the fact that the inputs will have defaults already applied. +// Also note that nested sets will only get matched if they are exactly the same. +func validInputsFromPlan( + path propertyPath, + inputs resource.PropertyValue, + plan resource.PropertyValue, + tfs shim.SchemaMap, + ps map[string]*info.Schema, +) bool { + abortErr := errors.New("abort") + visitor := func( + subpath propertyPath, inputsSubVal, planSubVal resource.PropertyValue, + ) error { + contract.Assertf( + !inputsSubVal.IsSecret() && !planSubVal.IsSecret() && !inputsSubVal.IsOutput() && !planSubVal.IsOutput(), + "validInputsFromPlan does not support secrets or outputs") + // Do not compare and do not descend into internal properties. + if subpath.IsReservedKey() { + return SkipChildrenError{} + } + + tfs, _, err := lookupSchemas(subpath, tfs, ps) + if err != nil { + return abortErr + } + + if tfs.Computed() && inputsSubVal.IsNull() { + // This is a computed property populated by the plan. We should not recurse into it. + return SkipChildrenError{} + } + + if tfs.Type() == shim.TypeList || tfs.Type() == shim.TypeSet { + // Note that nested sets will likely get their elements reordered. + // This means that nested sets will not be matched correctly but that should be a rare case. + if inputsSubVal.IsNull() { + // The plan is allowed to populate a nil list with an empty value. + if (planSubVal.IsArray() && len(planSubVal.ArrayValue()) == 0) || planSubVal.IsNull() { + return nil + } + return abortErr + } + if planSubVal.IsNull() { + // The plan is not allowed to replace an empty list with a nil value. + return abortErr + } + + if !inputsSubVal.IsArray() || !planSubVal.IsArray() { + return abortErr + } + + // all non-empty lists will get their element values checked. + return nil + } + + if tfs.Type() == shim.TypeMap { + if inputsSubVal.IsNull() { + // The plan is allowed to populate a nil map with an empty value. + if (planSubVal.IsObject() && len(planSubVal.ObjectValue()) == 0) || planSubVal.IsNull() { + return nil + } + return abortErr + } + if planSubVal.IsNull() { + // The plan is not allowed to replace an empty map with a nil value. + return abortErr + } + + if !inputsSubVal.IsObject() || !planSubVal.IsObject() { + return abortErr + } + + // all non-empty maps will get their element values checked. + return nil + } + + if inputsSubVal.DeepEquals(planSubVal) { + return nil + } + + return abortErr + } + err := walkTwoPropertyValues( + path, + inputs, + plan, + visitor, + ) + if err == abortErr || errors.Is(err, TypeMismatchError{}) { + return false + } + contract.AssertNoErrorf(err, "TransformPropertyValue should only return an abort error") + return true +} + type detailedDiffKey string type detailedDiffer struct { @@ -187,6 +287,14 @@ func (differ detailedDiffer) getEffectiveType(path walk.SchemaPath) shim.ValueTy return tfs.Type() } +func (differ detailedDiffer) isForceNew(path propertyPath) bool { + tfs, ps, err := lookupSchemas(path, differ.tfs, differ.ps) + if err != nil { + return false + } + return isForceNew(tfs, ps) +} + type ( setHash int arrayIndex int @@ -350,79 +458,125 @@ func (differ detailedDiffer) makeListDiff( func computeSetHashChanges( oldIdentities, newIdentities hashIndexMap, -) (removed, added hashIndexMap) { - removed = hashIndexMap{} - added = hashIndexMap{} +) (removed, added []arrayIndex) { + removed = []arrayIndex{} + added = []arrayIndex{} for elementHash := range oldIdentities { if _, ok := newIdentities[elementHash]; !ok { - removed[elementHash] = oldIdentities[elementHash] + removed = append(removed, oldIdentities[elementHash]) } } for elementHash := range newIdentities { if _, ok := oldIdentities[elementHash]; !ok { - added[elementHash] = newIdentities[elementHash] + added = append(added, newIdentities[elementHash]) } } + sort.Slice(removed, func(i, j int) bool { + return removed[i] < removed[j] + }) + sort.Slice(added, func(i, j int) bool { + return added[i] < added[j] + }) + return } -func (differ detailedDiffer) matchNewIndicesToInputs( - path propertyPath, changedIdentities hashIndexMap, -) hashIndexMap { - matched := hashIndexMap{} - +// matchPlanElementsToInputs is used to match the plan elements to the inputs. +// It returns a map of inputs indices to the planned state indices. +func (differ detailedDiffer) matchPlanElementsToInputs( + path propertyPath, changedPlanIndices []arrayIndex, plannedState []resource.PropertyValue, + rootNewInputs resource.PropertyMap, +) map[arrayIndex]arrayIndex { newInputsList := []resource.PropertyValue{} - newInputs, newInputsOk := path.GetFromMap(differ.newInputs) + newInputs, newInputsOk := path.GetFromMap(rootNewInputs) if newInputsOk && isPresent(newInputs) && newInputs.IsArray() { newInputsList = newInputs.ArrayValue() } - inputIdentities := hashIndexMap{} + if len(newInputsList) < len(plannedState) { + // If the number of inputs is less than the number of planned state elements, + // we can't match the elements to the inputs. + return nil + } - if !pathContainsComputed(path, differ.tfs, differ.ps) { - // The inputs are only safe to hash if the schema has no computed properties - inputIdentities = differ.calculateSetHashIndexMap(path, newInputsList) + matched := make(map[arrayIndex]arrayIndex) + used := make(map[int]bool, len(newInputsList)) + for k := range used { + used[k] = false } - for elementHash, newStateIndex := range changedIdentities { - if inputIndex, ok := inputIdentities[elementHash]; ok { - matched[elementHash] = inputIndex - } else { - GetLogger(differ.ctx).Warn(fmt.Sprintf( - "Additional changes detected in %s, the displayed diff might be inaccurate", - path.String())) - matched[elementHash] = newStateIndex + for _, index := range changedPlanIndices { + for i, input := range newInputsList { + if used[i] { + // This input has already been used to match an element in the planned state. + continue + } + + match := validInputsFromPlan(path.Index(int(index)), input, plannedState[index], differ.tfs, differ.ps) + if match { + matched[arrayIndex(i)] = index + used[i] = true + break + } } } return matched } -type hashPair struct { - oldHash setHash - newHash setHash +type setChange struct { + oldChanged bool + newChanged bool + plannedIndex arrayIndex } -func buildChangesIndexMap(added, removed hashIndexMap) map[arrayIndex]hashPair { - changes := map[arrayIndex]hashPair{} - for hash, index := range added { - changes[index] = hashPair{oldHash: -1, newHash: hash} - } - for hash, index := range removed { - if el, ok := changes[index]; !ok { - changes[index] = hashPair{oldHash: hash, newHash: -1} +func makeSetChangeMap( + removed []arrayIndex, + matchedInputIndices map[arrayIndex]arrayIndex, +) map[arrayIndex]setChange { + changes := map[arrayIndex]setChange{} + for _, index := range removed { + changes[index] = setChange{oldChanged: true, newChanged: false} + } + for inputIndex, planIndex := range matchedInputIndices { + if _, ok := changes[inputIndex]; !ok { + changes[inputIndex] = setChange{oldChanged: false, newChanged: true, plannedIndex: planIndex} } else { - el.oldHash = hash - changes[index] = el + changes[inputIndex] = setChange{oldChanged: true, newChanged: true, plannedIndex: planIndex} } } return changes } +func (differ detailedDiffer) makeSetDiffElementResult( + path propertyPath, + changes map[arrayIndex]setChange, + oldList, newList []resource.PropertyValue, +) map[detailedDiffKey]*pulumirpc.PropertyDiff { + diff := make(map[detailedDiffKey]*pulumirpc.PropertyDiff) + for index, change := range changes { + oldVal := resource.NewNullProperty() + if change.oldChanged { + oldVal = oldList[index] + } + newVal := resource.NewNullProperty() + if change.newChanged { + newVal = newList[change.plannedIndex] + } + + elemDiff := differ.makePropDiff(path.Index(int(index)), oldVal, newVal) + for subKey, subDiff := range elemDiff { + diff[subKey] = subDiff + } + } + + return diff +} + func (differ detailedDiffer) makeSetDiff( path propertyPath, old, new resource.PropertyValue, ) map[detailedDiffKey]*pulumirpc.PropertyDiff { @@ -435,27 +589,30 @@ func (differ detailedDiffer) makeSetDiff( removed, added := computeSetHashChanges(oldIdentities, newIdentities) + if len(removed) == 0 && len(added) == 0 { + return nil + } + // We need to match the new indices to the inputs to ensure that the identity of the // elements is preserved - this is necessary since the planning process can reorder // the elements. - addedInputs := differ.matchNewIndicesToInputs(path, added) - - changes := buildChangesIndexMap(addedInputs, removed) - for index, hashes := range changes { - oldVal := resource.NewNullProperty() - if removedIndex, ok := removed[hashes.oldHash]; ok { - oldVal = oldList[removedIndex] - } - newVal := resource.NewNullProperty() - if addedIndex, ok := added[hashes.newHash]; ok { - newVal = newList[addedIndex] - } - - elemDiff := differ.makePropDiff(path.Index(int(index)), oldVal, newVal) - for subKey, subDiff := range elemDiff { - diff[subKey] = subDiff + matchedInputIndices := differ.matchPlanElementsToInputs(path, added, newList, differ.newInputs) + if matchedInputIndices == nil || len(matchedInputIndices) != len(added) { + // If we can't match the elements to the inputs, we will return a diff against the whole set. + // This ensures we still display a diff to the user, even if the algorithm can't determine + // the correct diff for each element. + if differ.isForceNew(path) { + diff[path.Key()] = &pulumirpc.PropertyDiff{Kind: pulumirpc.PropertyDiff_UPDATE_REPLACE} + } else { + diff[path.Key()] = &pulumirpc.PropertyDiff{Kind: pulumirpc.PropertyDiff_UPDATE} } + return diff } + + // We've managed to match all elements to the inputs, so we can safely build an element-wise diff. + changes := makeSetChangeMap(removed, matchedInputIndices) + diff = differ.makeSetDiffElementResult(path, changes, oldList, newList) + return diff } diff --git a/pkg/tfbridge/detailed_diff_test.go b/pkg/tfbridge/detailed_diff_test.go index 7a6e59c45..740ad71ea 100644 --- a/pkg/tfbridge/detailed_diff_test.go +++ b/pkg/tfbridge/detailed_diff_test.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "fmt" + "reflect" "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -19,6 +20,311 @@ import ( shimv2 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2" ) +func TestValidInputsFromPlan(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + path propertyPath + inputValue resource.PropertyValue + planValue resource.PropertyValue + sdkv2Schema map[string]*schema.Schema + want bool + }{ + { + name: "simple matching values", + path: newPropertyPath("foo"), + inputValue: resource.NewStringProperty("bar"), + planValue: resource.NewStringProperty("bar"), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeString, + Optional: true, + }, + }, + want: true, + }, + { + name: "simple mismatched values", + path: newPropertyPath("foo"), + inputValue: resource.NewStringProperty("bar"), + planValue: resource.NewStringProperty("baz"), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeString, + Optional: true, + }, + }, + want: false, + }, + { + name: "computed property allows missing values", + path: newPropertyPath("foo"), + inputValue: resource.NewNullProperty(), + planValue: resource.NewStringProperty("computed"), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + want: true, + }, + { + name: "non-computed property requires matching values", + path: newPropertyPath("foo"), + inputValue: resource.NewStringProperty("bar"), + planValue: resource.NewStringProperty("different"), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeString, + Optional: true, + }, + }, + want: false, + }, + { + name: "set requires exact match", + path: newPropertyPath("set"), + inputValue: resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty("a"), + resource.NewStringProperty("b"), + }), + planValue: resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty("b"), + resource.NewStringProperty("a"), + }), + sdkv2Schema: map[string]*schema.Schema{ + "set": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + want: false, + }, + { + name: "missing non-computed property", + path: newPropertyPath("obj"), + inputValue: resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{}), + }, + ), + planValue: resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{ + "foo": resource.NewStringProperty("bar"), + }), + }, + ), + sdkv2Schema: map[string]*schema.Schema{ + "obj": { + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + want: false, + }, + { + name: "missing computed property", + path: newPropertyPath("obj"), + inputValue: resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{}), + }, + ), + planValue: resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{ + "foo": resource.NewStringProperty("bar"), + }), + }, + ), + sdkv2Schema: map[string]*schema.Schema{ + "obj": { + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + }, + }, + }, + want: true, + }, + { + name: "internal property ignored", + path: newPropertyPath("obj"), + inputValue: resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{ + "nested": resource.NewStringProperty("bar"), + "__defaults": resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty("foo"), + }), + }), + }, + ), + planValue: resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{ + "nested": resource.NewStringProperty("bar"), + }), + }, + ), + sdkv2Schema: map[string]*schema.Schema{ + "obj": { + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "nested": {Type: schema.TypeString}, + }, + }, + }, + }, + want: true, + }, + { + name: "unknown value", + path: newPropertyPath("foo"), + inputValue: resource.NewNullProperty(), + planValue: resource.NewComputedProperty(resource.Computed{Element: resource.NewStringProperty("")}), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + want: true, + }, + { + name: "unknown list value", + path: newPropertyPath("foo"), + inputValue: resource.NewNullProperty(), + planValue: resource.NewComputedProperty(resource.Computed{Element: resource.NewStringProperty("")}), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + want: true, + }, + { + name: "unknown map value", + path: newPropertyPath("foo"), + inputValue: resource.NewNullProperty(), + planValue: resource.NewComputedProperty(resource.Computed{Element: resource.NewStringProperty("")}), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + want: true, + }, + { + name: "unknown list block value", + path: newPropertyPath("foo"), + inputValue: resource.NewNullProperty(), + planValue: resource.NewComputedProperty(resource.Computed{Element: resource.NewStringProperty("")}), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bar": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + want: true, + }, + { + name: "empty to nil list", + path: newPropertyPath("foo"), + inputValue: resource.NewArrayProperty([]resource.PropertyValue{}), + planValue: resource.NewNullProperty(), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + want: false, + }, + { + name: "nil to empty list", + path: newPropertyPath("foo"), + inputValue: resource.NewNullProperty(), + planValue: resource.NewArrayProperty([]resource.PropertyValue{}), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + want: true, + }, + { + name: "empty list to empty map", + path: newPropertyPath("foo"), + inputValue: resource.NewArrayProperty([]resource.PropertyValue{}), + planValue: resource.NewObjectProperty(resource.PropertyMap{}), + sdkv2Schema: map[string]*schema.Schema{ + "foo": { + Type: schema.TypeMap, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + want: false, + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + tfs := shimv2.NewSchemaMap(tt.sdkv2Schema) + got := validInputsFromPlan( + tt.path, + tt.inputValue, + tt.planValue, + tfs, + nil, + ) + require.Equal(t, tt.want, got) + }) + } +} + func TestDiffPair(t *testing.T) { t.Parallel() assert.Equal(t, (newPropertyPath("foo").Subpath("bar")).Key(), detailedDiffKey("foo.bar")) @@ -2616,7 +2922,7 @@ func TestDetailedDiffMismatchedSchemas(t *testing.T) { func TestDetailedDiffSetHashChanges(t *testing.T) { t.Parallel() - runTest := func(old, new hashIndexMap, expectedRemoved, expectedAdded hashIndexMap) { + runTest := func(old, new hashIndexMap, expectedRemoved, expectedAdded []arrayIndex) { t.Helper() removed, added := computeSetHashChanges(old, new) @@ -2624,136 +2930,10 @@ func TestDetailedDiffSetHashChanges(t *testing.T) { require.Equal(t, added, expectedAdded) } - runTest(hashIndexMap{}, hashIndexMap{}, hashIndexMap{}, hashIndexMap{}) - runTest(hashIndexMap{1: 1}, hashIndexMap{1: 1}, hashIndexMap{}, hashIndexMap{}) - runTest(hashIndexMap{1: 1}, hashIndexMap{}, hashIndexMap{1: 1}, hashIndexMap{}) - runTest(hashIndexMap{1: 1}, hashIndexMap{2: 2}, hashIndexMap{1: 1}, hashIndexMap{2: 2}) -} - -func TestDetailedDiffMatchNewIndicesToInputs(t *testing.T) { - t.Parallel() - tfs := shimv2.NewSchemaMap(map[string]*schema.Schema{ - "foo": { - Type: schema.TypeSet, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - }) - - getHash := func(element string) setHash { - return setHash(tfs.Get("foo").SetHash(element)) - } - - runTest := func( - newInputs []resource.PropertyValue, changes hashIndexMap, expected hashIndexMap, logBuf *bytes.Buffer, - ) { - t.Helper() - ctx := logging.InitLogging(context.Background(), logging.LogOptions{ - LogSink: &testLogSink{buf: logBuf}, - }) - inputs := resource.NewPropertyMapFromMap(map[string]interface{}{ - "foo": newInputs, - }) - differ := detailedDiffer{ - ctx: ctx, - tfs: tfs, - ps: nil, - newInputs: inputs, - } - matched := differ.matchNewIndicesToInputs(newPropertyPath("foo"), changes) - require.Equal(t, matched, expected) - } - - t.Run("single element", func(t *testing.T) { - logBuf := &bytes.Buffer{} - runTest( - []resource.PropertyValue{resource.NewStringProperty("val1")}, - hashIndexMap{getHash("val1"): 0}, - hashIndexMap{getHash("val1"): 0}, - logBuf, - ) - require.Empty(t, logBuf.String()) - }) - - t.Run("single element, doesn't match", func(t *testing.T) { - logBuf := &bytes.Buffer{} - runTest( - []resource.PropertyValue{resource.NewStringProperty("val1")}, - hashIndexMap{getHash("val2"): 0}, - hashIndexMap{getHash("val2"): 0}, - logBuf, - ) - require.Contains(t, logBuf.String(), "Additional changes detected in foo") - }) - - t.Run("two elements, one changed", func(t *testing.T) { - logBuf := &bytes.Buffer{} - runTest( - []resource.PropertyValue{resource.NewStringProperty("val1"), resource.NewStringProperty("val2")}, - hashIndexMap{getHash("val2"): 1}, - hashIndexMap{getHash("val2"): 1}, - logBuf, - ) - require.Empty(t, logBuf.String()) - }) - - t.Run("two elements, both changed", func(t *testing.T) { - logBuf := &bytes.Buffer{} - runTest( - []resource.PropertyValue{resource.NewStringProperty("val1"), resource.NewStringProperty("val2")}, - hashIndexMap{getHash("val1"): 0, getHash("val2"): 1}, - hashIndexMap{getHash("val1"): 0, getHash("val2"): 1}, - logBuf, - ) - require.Empty(t, logBuf.String()) - }) - - t.Run("two elements, one changed, one doesn't match", func(t *testing.T) { - logBuf := &bytes.Buffer{} - runTest( - []resource.PropertyValue{resource.NewStringProperty("val1"), resource.NewStringProperty("val2")}, - hashIndexMap{getHash("val1"): 0, getHash("val3"): 1}, - hashIndexMap{getHash("val1"): 0, getHash("val3"): 1}, - logBuf, - ) - require.Contains(t, logBuf.String(), "Additional changes detected in foo") - }) -} - -func TestDetailedDiffBuildChangesIndexMap(t *testing.T) { - t.Parallel() - runTest := func(added, removed hashIndexMap, expected map[arrayIndex]hashPair) { - t.Helper() - changes := buildChangesIndexMap(added, removed) - require.Equal(t, expected, changes) - } - - t.Run("empty", func(t *testing.T) { - runTest(hashIndexMap{}, hashIndexMap{}, map[arrayIndex]hashPair{}) - }) - t.Run("one added", func(t *testing.T) { - runTest(hashIndexMap{1: 0}, hashIndexMap{}, map[arrayIndex]hashPair{ - 0: {oldHash: -1, newHash: 1}, - }) - }) - t.Run("one removed", func(t *testing.T) { - runTest(hashIndexMap{}, hashIndexMap{1: 0}, map[arrayIndex]hashPair{ - 0: {oldHash: 1, newHash: -1}, - }) - }) - t.Run("one added, one removed, different indices", func(t *testing.T) { - runTest(hashIndexMap{1: 0}, hashIndexMap{2: 1}, map[arrayIndex]hashPair{ - 0: {oldHash: -1, newHash: 1}, - 1: {oldHash: 2, newHash: -1}, - }) - }) - - t.Run("one added, one removed, same indices", func(t *testing.T) { - runTest(hashIndexMap{1: 0}, hashIndexMap{2: 0}, map[arrayIndex]hashPair{ - 0: {oldHash: 2, newHash: 1}, - }) - }) + runTest(hashIndexMap{}, hashIndexMap{}, []arrayIndex{}, []arrayIndex{}) + runTest(hashIndexMap{1: 1}, hashIndexMap{1: 1}, []arrayIndex{}, []arrayIndex{}) + runTest(hashIndexMap{1: 1}, hashIndexMap{}, []arrayIndex{1}, []arrayIndex{}) + runTest(hashIndexMap{1: 1}, hashIndexMap{2: 2}, []arrayIndex{1}, []arrayIndex{2}) } func TestDetailedDiffSetHashPanicCaught(t *testing.T) { @@ -2880,3 +3060,244 @@ func TestContainsReplace(t *testing.T) { require.False(t, containsReplace(map[string]*pulumirpc.PropertyDiff{})) } + +func TestMatchPlanElementsToInputs(t *testing.T) { + t.Parallel() + tfs := shimv2.NewSchemaMap(map[string]*schema.Schema{ + "my_list": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }) + + ps := map[string]*SchemaInfo{} + tests := []struct { + name string + path propertyPath + changedIndices []arrayIndex + plannedState []resource.PropertyValue + newInputs resource.PropertyMap + expectedMatches map[arrayIndex]arrayIndex + }{ + { + name: "basic matching", + path: newPropertyPath("myList"), + changedIndices: []arrayIndex{0, 1}, + plannedState: []resource.PropertyValue{ + resource.NewStringProperty("foo"), + resource.NewStringProperty("bar"), + }, + newInputs: resource.PropertyMap{ + "myList": resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty("foo"), + resource.NewStringProperty("bar"), + }), + }, + expectedMatches: map[arrayIndex]arrayIndex{ + 0: 0, + 1: 1, + }, + }, + { + name: "length mismatch returns nil", + path: newPropertyPath("myList"), + changedIndices: []arrayIndex{0}, + plannedState: []resource.PropertyValue{ + resource.NewStringProperty("foo"), + resource.NewStringProperty("bar"), + }, + newInputs: resource.PropertyMap{ + "myList": resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty("foo"), + }), + }, + expectedMatches: nil, + }, + { + name: "no matches returns empty slice", + path: newPropertyPath("myList"), + changedIndices: []arrayIndex{0}, + plannedState: []resource.PropertyValue{ + resource.NewStringProperty("foo"), + resource.NewStringProperty("bar"), + }, + newInputs: resource.PropertyMap{ + "myList": resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty("baz"), + resource.NewStringProperty("qux"), + }), + }, + expectedMatches: map[arrayIndex]arrayIndex{}, + }, + { + name: "missing input path returns empty slice", + path: newPropertyPath("nonexistentList"), + changedIndices: []arrayIndex{0}, + plannedState: []resource.PropertyValue{ + resource.NewStringProperty("foo"), + }, + newInputs: resource.PropertyMap{}, + expectedMatches: nil, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + differ := detailedDiffer{ + ctx: context.Background(), + tfs: tfs, + ps: ps, + } + + matches := differ.matchPlanElementsToInputs(tt.path, tt.changedIndices, tt.plannedState, tt.newInputs) + + if tt.expectedMatches == nil && matches != nil { + t.Errorf("expected nil matches, got %v", matches) + return + } + + if !reflect.DeepEqual(matches, tt.expectedMatches) { + t.Errorf("expected matches %v, got %v", tt.expectedMatches, matches) + } + }) + } +} + +func TestMakeSetDiffElementResult(t *testing.T) { + t.Parallel() + + // Create a basic differ instance for testing + differ := detailedDiffer{ + ctx: context.Background(), + tfs: shimv2.NewSchemaMap(map[string]*schema.Schema{ + "test_set": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }), + } + + tests := []struct { + name string + path propertyPath + changes map[arrayIndex]setChange + oldList []resource.PropertyValue + newList []resource.PropertyValue + expected map[detailedDiffKey]*pulumirpc.PropertyDiff + }{ + { + name: "add element", + path: newPropertyPath("test_set"), + changes: map[arrayIndex]setChange{ + 0: { + oldChanged: false, + newChanged: true, + plannedIndex: 0, + }, + }, + oldList: []resource.PropertyValue{}, + newList: []resource.PropertyValue{ + resource.NewStringProperty("new_value"), + }, + expected: map[detailedDiffKey]*pulumirpc.PropertyDiff{ + detailedDiffKey("test_set[0]"): {Kind: pulumirpc.PropertyDiff_ADD}, + }, + }, + { + name: "delete element", + path: newPropertyPath("test_set"), + changes: map[arrayIndex]setChange{ + 0: { + oldChanged: true, + newChanged: false, + plannedIndex: 0, + }, + }, + oldList: []resource.PropertyValue{ + resource.NewStringProperty("old_value"), + }, + newList: []resource.PropertyValue{}, + expected: map[detailedDiffKey]*pulumirpc.PropertyDiff{ + detailedDiffKey("test_set[0]"): {Kind: pulumirpc.PropertyDiff_DELETE}, + }, + }, + { + name: "update element", + path: newPropertyPath("test_set"), + changes: map[arrayIndex]setChange{ + 0: { + oldChanged: true, + newChanged: true, + plannedIndex: 0, + }, + }, + oldList: []resource.PropertyValue{ + resource.NewStringProperty("old_value"), + }, + newList: []resource.PropertyValue{ + resource.NewStringProperty("new_value"), + }, + expected: map[detailedDiffKey]*pulumirpc.PropertyDiff{ + detailedDiffKey("test_set[0]"): {Kind: pulumirpc.PropertyDiff_UPDATE}, + }, + }, + { + name: "multiple changes", + path: newPropertyPath("test_set"), + changes: map[arrayIndex]setChange{ + 0: { + oldChanged: true, + newChanged: false, + plannedIndex: 0, + }, + 1: { + oldChanged: true, + newChanged: true, + plannedIndex: 1, + }, + 2: { + oldChanged: false, + newChanged: true, + plannedIndex: 0, + }, + }, + oldList: []resource.PropertyValue{ + resource.NewStringProperty("delete_value"), + resource.NewStringProperty("update_old_value"), + resource.NewStringProperty("no_change_value"), + }, + newList: []resource.PropertyValue{ + resource.NewStringProperty("no_change_value"), + resource.NewStringProperty("update_new_value"), + resource.NewStringProperty("add_value"), + }, + expected: map[detailedDiffKey]*pulumirpc.PropertyDiff{ + detailedDiffKey("test_set[0]"): {Kind: pulumirpc.PropertyDiff_DELETE}, + detailedDiffKey("test_set[1]"): {Kind: pulumirpc.PropertyDiff_UPDATE}, + detailedDiffKey("test_set[2]"): {Kind: pulumirpc.PropertyDiff_ADD}, + }, + }, + { + name: "no changes", + path: newPropertyPath("test_set"), + changes: map[arrayIndex]setChange{}, + oldList: []resource.PropertyValue{}, + newList: []resource.PropertyValue{}, + expected: map[detailedDiffKey]*pulumirpc.PropertyDiff{}, + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + result := differ.makeSetDiffElementResult(tt.path, tt.changes, tt.oldList, tt.newList) + require.Equal(t, tt.expected, result) + }) + } +} diff --git a/pkg/tfbridge/property_path.go b/pkg/tfbridge/property_path.go index 9a1f9969b..321d877b7 100644 --- a/pkg/tfbridge/property_path.go +++ b/pkg/tfbridge/property_path.go @@ -7,7 +7,6 @@ import ( "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info" shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim" - "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/walk" "github.com/pulumi/pulumi-terraform-bridge/v3/unstable/propertyvalue" ) @@ -207,23 +206,3 @@ func propertyValueTriggersReplacement( return replacement } - -// pathContainsComputed returns true if the schema contains a Computed property at a path prefixed by path. -func pathContainsComputed( - path propertyPath, rootTFSchema shim.SchemaMap, rootPulumiSchema map[string]*info.Schema, -) bool { - tfs, _, err := lookupSchemas(path, rootTFSchema, rootPulumiSchema) - if err != nil { - return false - } - - computed := false - visitor := func(path walk.SchemaPath, tfs shim.Schema) { - if tfs.Computed() { - computed = true - } - } - walk.VisitSchema(tfs, visitor) - - return computed -} diff --git a/pkg/tfbridge/property_path_test.go b/pkg/tfbridge/property_path_test.go index 8b19aab15..868d0dd31 100644 --- a/pkg/tfbridge/property_path_test.go +++ b/pkg/tfbridge/property_path_test.go @@ -3,9 +3,13 @@ package tfbridge import ( "testing" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/common/resource" "github.com/stretchr/testify/require" + + shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim" + shimv2 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2" ) func TestWalkTwoPropertyValues(t *testing.T) { @@ -303,3 +307,54 @@ func TestWalkTwoPropertyValues(t *testing.T) { require.IsType(t, TypeMismatchError{}, err) }) } + +func TestPropertyPath(t *testing.T) { + t.Parallel() + require.Equal(t, newPropertyPath("foo").Subpath("bar").Key(), detailedDiffKey("foo.bar")) +} + +func TestLookupSchemasPropertyPath(t *testing.T) { + t.Parallel() + + t.Run("string schema", func(t *testing.T) { + schemaMap := shimv2.NewSchemaMap(map[string]*schema.Schema{ + "foo": {Type: schema.TypeString}, + }) + + sch, _, err := lookupSchemas(newPropertyPath("foo"), schemaMap, nil) + require.NoError(t, err) + require.Equal(t, shim.TypeString, sch.Type()) + }) + + t.Run("list schema", func(t *testing.T) { + tfs := shimv2.NewSchemaMap(map[string]*schema.Schema{ + "my_list": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }) + + sch, _, err := lookupSchemas(newPropertyPath("myList"), tfs, nil) + require.NoError(t, err) + require.Equal(t, shim.TypeList, sch.Type()) + }) + + t.Run("list element schema", func(t *testing.T) { + tfs := shimv2.NewSchemaMap(map[string]*schema.Schema{ + "my_list": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }) + + sch, _, err := lookupSchemas(newPropertyPath("myList").Index(0), tfs, nil) + require.NoError(t, err) + require.Equal(t, shim.TypeString, sch.Type()) + }) +} diff --git a/pkg/tfbridge/walk_test.go b/pkg/tfbridge/walk_test.go index b080a3ee8..296e73872 100644 --- a/pkg/tfbridge/walk_test.go +++ b/pkg/tfbridge/walk_test.go @@ -18,11 +18,12 @@ import ( "strings" "testing" + sdkv2schema "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/pulumi/pulumi/sdk/v3/go/common/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim" + shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim" "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/schema" shimv2 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2" "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/walk" @@ -457,3 +458,49 @@ func TestTraversePropertiesSchemaInfo(t *testing.T) { Fields["nested_resources"].Elem. Fields["configuration"]) } + +func TestLookupSchemas(t *testing.T) { + t.Parallel() + + t.Run("string schema", func(t *testing.T) { + schemaMap := shimv2.NewSchemaMap(map[string]*sdkv2schema.Schema{ + "foo": {Type: sdkv2schema.TypeString}, + }) + + sch, _, err := LookupSchemas(walk.NewSchemaPath().GetAttr("foo"), schemaMap, nil) + require.NoError(t, err) + require.Equal(t, shim.TypeString, sch.Type()) + }) + + t.Run("list schema", func(t *testing.T) { + tfs := shimv2.NewSchemaMap(map[string]*sdkv2schema.Schema{ + "myList": { + Type: sdkv2schema.TypeList, + Optional: true, + Elem: &sdkv2schema.Schema{ + Type: sdkv2schema.TypeString, + }, + }, + }) + + sch, _, err := LookupSchemas(walk.NewSchemaPath().GetAttr("myList"), tfs, nil) + require.NoError(t, err) + require.Equal(t, shim.TypeList, sch.Type()) + }) + + t.Run("list element schema", func(t *testing.T) { + tfs := shimv2.NewSchemaMap(map[string]*sdkv2schema.Schema{ + "myList": { + Type: sdkv2schema.TypeList, + Optional: true, + Elem: &sdkv2schema.Schema{ + Type: sdkv2schema.TypeString, + }, + }, + }) + + sch, _, err := LookupSchemas(walk.NewSchemaPath().GetAttr("myList").Element(), tfs, nil) + require.NoError(t, err) + require.Equal(t, shim.TypeString, sch.Type()) + }) +}