From 3a114ca8d7753bf16b6ae86380197e9c69872ea0 Mon Sep 17 00:00:00 2001 From: Venelin Date: Tue, 14 Jan 2025 13:03:56 +0200 Subject: [PATCH] recordings --- .../optional/added.golden | 31 ++++++++++++++++++ .../optional/changed.golden | 31 ++++++++++++++++++ .../optional/removed.golden | 31 ++++++++++++++++++ .../optional/unchanged_empty.golden | 15 +++++++++ .../optional/unchanged_non-empty.golden | 15 +++++++++ .../optionalComputed/added.golden | 15 +++++++++ .../optionalComputed/changed.golden | 31 ++++++++++++++++++ .../optionalComputed/removed.golden | 31 ++++++++++++++++++ .../optionalComputed/unchanged_empty.golden | 31 ++++++++++++++++++ .../unchanged_non-empty.golden | 15 +++++++++ .../optionalComputedForceNew/added.golden | 15 +++++++++ .../optionalComputedForceNew/changed.golden | 31 ++++++++++++++++++ .../optionalComputedForceNew/removed.golden | 31 ++++++++++++++++++ .../unchanged_empty.golden | 31 ++++++++++++++++++ .../unchanged_non-empty.golden | 15 +++++++++ .../optionalDefault/added.golden | 31 ++++++++++++++++++ .../optionalDefault/changed.golden | 31 ++++++++++++++++++ .../optionalDefault/removed.golden | 31 ++++++++++++++++++ .../optionalDefault/unchanged_empty.golden | 15 +++++++++ .../unchanged_non-empty.golden | 15 +++++++++ .../optionalDefaultForceNew/added.golden | 31 ++++++++++++++++++ .../optionalDefaultForceNew/changed.golden | 31 ++++++++++++++++++ .../optionalDefaultForceNew/removed.golden | 31 ++++++++++++++++++ .../unchanged_empty.golden | 15 +++++++++ .../unchanged_non-empty.golden | 15 +++++++++ .../optionalForceNew/added.golden | 31 ++++++++++++++++++ .../optionalForceNew/changed.golden | 31 ++++++++++++++++++ .../optionalForceNew/removed.golden | 31 ++++++++++++++++++ .../optionalForceNew/unchanged_empty.golden | 15 +++++++++ .../unchanged_non-empty.golden | 15 +++++++++ .../required/added.golden | 31 ++++++++++++++++++ .../required/changed.golden | 31 ++++++++++++++++++ .../required/removed.golden | 31 ++++++++++++++++++ .../required/unchanged_empty.golden | 15 +++++++++ .../required/unchanged_non-empty.golden | 15 +++++++++ .../requiredForceNew/added.golden | 31 ++++++++++++++++++ .../requiredForceNew/changed.golden | 31 ++++++++++++++++++ .../requiredForceNew/removed.golden | 31 ++++++++++++++++++ .../requiredForceNew/unchanged_empty.golden | 15 +++++++++ .../unchanged_non-empty.golden | 15 +++++++++ .../optional/added.golden | 32 +++++++++++++++++++ .../optional/changed.golden | 32 +++++++++++++++++++ .../optional/removed.golden | 32 +++++++++++++++++++ .../optional/unchanged_empty.golden | 16 ++++++++++ .../optional/unchanged_non-empty.golden | 16 ++++++++++ .../optionalComputed/added.golden | 32 +++++++++++++++++++ .../optionalComputed/changed.golden | 32 +++++++++++++++++++ .../optionalComputed/removed.golden | 32 +++++++++++++++++++ .../optionalComputed/unchanged_empty.golden | 32 +++++++++++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../optionalComputedForceNew/added.golden | 32 +++++++++++++++++++ .../optionalComputedForceNew/changed.golden | 32 +++++++++++++++++++ .../optionalComputedForceNew/removed.golden | 32 +++++++++++++++++++ .../unchanged_empty.golden | 32 +++++++++++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../optionalDefault/added.golden | 32 +++++++++++++++++++ .../optionalDefault/changed.golden | 32 +++++++++++++++++++ .../optionalDefault/removed.golden | 32 +++++++++++++++++++ .../optionalDefault/unchanged_empty.golden | 16 ++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../optionalDefaultForceNew/added.golden | 32 +++++++++++++++++++ .../optionalDefaultForceNew/changed.golden | 32 +++++++++++++++++++ .../optionalDefaultForceNew/removed.golden | 32 +++++++++++++++++++ .../unchanged_empty.golden | 16 ++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../optionalForceNew/added.golden | 32 +++++++++++++++++++ .../optionalForceNew/changed.golden | 32 +++++++++++++++++++ .../optionalForceNew/removed.golden | 32 +++++++++++++++++++ .../optionalForceNew/unchanged_empty.golden | 16 ++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../required/added.golden | 32 +++++++++++++++++++ .../required/changed.golden | 32 +++++++++++++++++++ .../required/removed.golden | 32 +++++++++++++++++++ .../required/unchanged_empty.golden | 16 ++++++++++ .../required/unchanged_non-empty.golden | 16 ++++++++++ .../requiredForceNew/added.golden | 32 +++++++++++++++++++ .../requiredForceNew/changed.golden | 32 +++++++++++++++++++ .../requiredForceNew/removed.golden | 32 +++++++++++++++++++ .../requiredForceNew/unchanged_empty.golden | 16 ++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../optional/added.golden | 32 +++++++++++++++++++ .../optional/changed.golden | 32 +++++++++++++++++++ .../optional/removed.golden | 32 +++++++++++++++++++ .../optional/unchanged_empty.golden | 16 ++++++++++ .../optional/unchanged_non-empty.golden | 16 ++++++++++ .../optionalComputed/added.golden | 32 +++++++++++++++++++ .../optionalComputed/changed.golden | 32 +++++++++++++++++++ .../optionalComputed/removed.golden | 32 +++++++++++++++++++ .../optionalComputed/unchanged_empty.golden | 32 +++++++++++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../optionalComputedForceNew/added.golden | 32 +++++++++++++++++++ .../optionalComputedForceNew/changed.golden | 32 +++++++++++++++++++ .../optionalComputedForceNew/removed.golden | 32 +++++++++++++++++++ .../unchanged_empty.golden | 32 +++++++++++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../optionalDefault/added.golden | 32 +++++++++++++++++++ .../optionalDefault/changed.golden | 32 +++++++++++++++++++ .../optionalDefault/removed.golden | 32 +++++++++++++++++++ .../optionalDefault/unchanged_empty.golden | 16 ++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../optionalDefaultForceNew/added.golden | 32 +++++++++++++++++++ .../optionalDefaultForceNew/changed.golden | 32 +++++++++++++++++++ .../optionalDefaultForceNew/removed.golden | 32 +++++++++++++++++++ .../unchanged_empty.golden | 16 ++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../optionalForceNew/added.golden | 32 +++++++++++++++++++ .../optionalForceNew/changed.golden | 32 +++++++++++++++++++ .../optionalForceNew/removed.golden | 32 +++++++++++++++++++ .../optionalForceNew/unchanged_empty.golden | 16 ++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ .../required/added.golden | 32 +++++++++++++++++++ .../required/changed.golden | 32 +++++++++++++++++++ .../required/removed.golden | 32 +++++++++++++++++++ .../required/unchanged_empty.golden | 16 ++++++++++ .../required/unchanged_non-empty.golden | 16 ++++++++++ .../requiredForceNew/added.golden | 32 +++++++++++++++++++ .../requiredForceNew/changed.golden | 32 +++++++++++++++++++ .../requiredForceNew/removed.golden | 32 +++++++++++++++++++ .../requiredForceNew/unchanged_empty.golden | 16 ++++++++++ .../unchanged_non-empty.golden | 16 ++++++++++ 120 files changed, 3096 insertions(+) create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/unchanged_non-empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/added.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/changed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/removed.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/unchanged_empty.golden create mode 100644 pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/unchanged_non-empty.golden diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/added.golden new file mode 100644 index 000000000..cf38f6a37 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/added.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(true), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = false -> true + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: false => true +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/changed.golden new file mode 100644 index 000000000..564920693 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/changed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = true -> false + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/removed.golden new file mode 100644 index 000000000..564920693 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/removed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = true -> false + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/unchanged_empty.golden new file mode 100644 index 000000000..96e43c9b8 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/unchanged_empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(false), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/unchanged_non-empty.golden new file mode 100644 index 000000000..706b6da68 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optional/unchanged_non-empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(true), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/added.golden new file mode 100644 index 000000000..c4701d306 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/added.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(true), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/changed.golden new file mode 100644 index 000000000..5f507c6b3 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/changed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = true -> false + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/removed.golden new file mode 100644 index 000000000..5f507c6b3 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/removed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = true -> false + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/unchanged_empty.golden new file mode 100644 index 000000000..faa41da3d --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/unchanged_empty.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = true -> false + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/unchanged_non-empty.golden new file mode 100644 index 000000000..706b6da68 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputed/unchanged_non-empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(true), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/added.golden new file mode 100644 index 000000000..c4701d306 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/added.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(true), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/changed.golden new file mode 100644 index 000000000..20b509a2c --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/changed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = true -> false # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/removed.golden new file mode 100644 index 000000000..20b509a2c --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/removed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = true -> false # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/unchanged_empty.golden new file mode 100644 index 000000000..21e7d83be --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/unchanged_empty.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = true -> false # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..706b6da68 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalComputedForceNew/unchanged_non-empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(true), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/added.golden new file mode 100644 index 000000000..cf38f6a37 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/added.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(true), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = false -> true + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: false => true +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/changed.golden new file mode 100644 index 000000000..564920693 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/changed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = true -> false + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/removed.golden new file mode 100644 index 000000000..564920693 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/removed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = true -> false + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/unchanged_empty.golden new file mode 100644 index 000000000..96e43c9b8 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/unchanged_empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(false), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/unchanged_non-empty.golden new file mode 100644 index 000000000..706b6da68 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefault/unchanged_non-empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(true), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/added.golden new file mode 100644 index 000000000..15dcbecee --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/added.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(true), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = false -> true # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: false => true +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/changed.golden new file mode 100644 index 000000000..b4e804ab5 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/changed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = true -> false # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/removed.golden new file mode 100644 index 000000000..b4e804ab5 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/removed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = true -> false # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/unchanged_empty.golden new file mode 100644 index 000000000..96e43c9b8 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/unchanged_empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(false), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..706b6da68 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalDefaultForceNew/unchanged_non-empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(true), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/added.golden new file mode 100644 index 000000000..15dcbecee --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/added.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(true), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = false -> true # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: false => true +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/changed.golden new file mode 100644 index 000000000..b4e804ab5 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/changed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = true -> false # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/removed.golden new file mode 100644 index 000000000..b4e804ab5 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/removed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = true -> false # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/unchanged_empty.golden new file mode 100644 index 000000000..96e43c9b8 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/unchanged_empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(false), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..706b6da68 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/optionalForceNew/unchanged_non-empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(true), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/added.golden new file mode 100644 index 000000000..cf38f6a37 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/added.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(true), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = false -> true + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: false => true +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/changed.golden new file mode 100644 index 000000000..564920693 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/changed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = true -> false + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/removed.golden new file mode 100644 index 000000000..564920693 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/removed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = true -> false + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/unchanged_empty.golden new file mode 100644 index 000000000..96e43c9b8 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/unchanged_empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(false), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/unchanged_non-empty.golden new file mode 100644 index 000000000..706b6da68 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/required/unchanged_non-empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(true), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/added.golden new file mode 100644 index 000000000..15dcbecee --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/added.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(true), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = false -> true # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: false => true +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/changed.golden new file mode 100644 index 000000000..b4e804ab5 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/changed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = true -> false # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/removed.golden new file mode 100644 index 000000000..b4e804ab5 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/removed.golden @@ -0,0 +1,31 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(false), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = true -> false # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: true => false +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/unchanged_empty.golden new file mode 100644 index 000000000..96e43c9b8 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/unchanged_empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(false), changeValue: valast.Ptr(false), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..706b6da68 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffBool/requiredForceNew/unchanged_non-empty.golden @@ -0,0 +1,15 @@ +tests.testOutput{ + initialValue: valast.Ptr(true), changeValue: valast.Ptr(true), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/added.golden new file mode 100644 index 000000000..cfad67fbc --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 0 -> 1 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/changed.golden new file mode 100644 index 000000000..198764dfe --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 2 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/removed.golden new file mode 100644 index 000000000..04796494b --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 0 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/unchanged_empty.golden new file mode 100644 index 000000000..1cd310bac --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/unchanged_non-empty.golden new file mode 100644 index 000000000..fa2c69d67 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optional/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/added.golden new file mode 100644 index 000000000..7ecf8f96a --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = 3 -> 1 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 3 => 1 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/changed.golden new file mode 100644 index 000000000..301fd66fc --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = 1 -> 2 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/removed.golden new file mode 100644 index 000000000..f7df7690b --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = 1 -> 0 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/unchanged_empty.golden new file mode 100644 index 000000000..203f3e467 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/unchanged_empty.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = 3 -> 0 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 3 => 0 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/unchanged_non-empty.golden new file mode 100644 index 000000000..fa2c69d67 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputed/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/added.golden new file mode 100644 index 000000000..8d95a4556 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = 3 -> 1 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 3 => 1 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/changed.golden new file mode 100644 index 000000000..31c7358fd --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = 1 -> 2 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/removed.golden new file mode 100644 index 000000000..a27e88235 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = 1 -> 0 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/unchanged_empty.golden new file mode 100644 index 000000000..0e58c49fd --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/unchanged_empty.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = 3 -> 0 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 3 => 0 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..fa2c69d67 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalComputedForceNew/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/added.golden new file mode 100644 index 000000000..cfad67fbc --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 0 -> 1 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/changed.golden new file mode 100644 index 000000000..198764dfe --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 2 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/removed.golden new file mode 100644 index 000000000..04796494b --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 0 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/unchanged_empty.golden new file mode 100644 index 000000000..1cd310bac --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/unchanged_non-empty.golden new file mode 100644 index 000000000..fa2c69d67 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefault/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/added.golden new file mode 100644 index 000000000..0aa06cbd0 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 0 -> 1 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/changed.golden new file mode 100644 index 000000000..330e15834 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 2 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/removed.golden new file mode 100644 index 000000000..42cd5eb89 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 0 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/unchanged_empty.golden new file mode 100644 index 000000000..1cd310bac --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..fa2c69d67 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalDefaultForceNew/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/added.golden new file mode 100644 index 000000000..0aa06cbd0 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 0 -> 1 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/changed.golden new file mode 100644 index 000000000..330e15834 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 2 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/removed.golden new file mode 100644 index 000000000..42cd5eb89 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 0 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/unchanged_empty.golden new file mode 100644 index 000000000..1cd310bac --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..fa2c69d67 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/optionalForceNew/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/added.golden new file mode 100644 index 000000000..cfad67fbc --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 0 -> 1 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/changed.golden new file mode 100644 index 000000000..198764dfe --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 2 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/removed.golden new file mode 100644 index 000000000..04796494b --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 0 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/unchanged_empty.golden new file mode 100644 index 000000000..1cd310bac --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/unchanged_non-empty.golden new file mode 100644 index 000000000..fa2c69d67 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/required/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/added.golden new file mode 100644 index 000000000..0aa06cbd0 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 0 -> 1 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/changed.golden new file mode 100644 index 000000000..330e15834 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 2 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/removed.golden new file mode 100644 index 000000000..42cd5eb89 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 0 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/unchanged_empty.golden new file mode 100644 index 000000000..1cd310bac --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(0)), + changeValue: valast.Ptr(float64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..fa2c69d67 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffFloat/requiredForceNew/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(float64(1)), + changeValue: valast.Ptr(float64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/added.golden new file mode 100644 index 000000000..eb372e44d --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 0 -> 1 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/changed.golden new file mode 100644 index 000000000..f0564af44 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 2 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/removed.golden new file mode 100644 index 000000000..32ac766b7 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 0 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/unchanged_empty.golden new file mode 100644 index 000000000..b2d49b145 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/unchanged_non-empty.golden new file mode 100644 index 000000000..ff4a6371a --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optional/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/added.golden new file mode 100644 index 000000000..094ac1be0 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = 3 -> 1 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 3 => 1 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/changed.golden new file mode 100644 index 000000000..8143d2da5 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = 1 -> 2 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/removed.golden new file mode 100644 index 000000000..2a33bbd30 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = 1 -> 0 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/unchanged_empty.golden new file mode 100644 index 000000000..5450a0ee5 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/unchanged_empty.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "id" + ~ prop = 3 -> 0 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 3 => 0 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/unchanged_non-empty.golden new file mode 100644 index 000000000..ff4a6371a --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputed/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/added.golden new file mode 100644 index 000000000..8100f7b6f --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = 3 -> 1 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 3 => 1 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/changed.golden new file mode 100644 index 000000000..186276491 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = 1 -> 2 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/removed.golden new file mode 100644 index 000000000..d94315fd4 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = 1 -> 0 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/unchanged_empty.golden new file mode 100644 index 000000000..6710e22dd --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/unchanged_empty.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "id" -> (known after apply) + ~ prop = 3 -> 0 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=id] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 3 => 0 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..ff4a6371a --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalComputedForceNew/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/added.golden new file mode 100644 index 000000000..eb372e44d --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 0 -> 1 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/changed.golden new file mode 100644 index 000000000..f0564af44 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 2 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/removed.golden new file mode 100644 index 000000000..32ac766b7 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 0 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/unchanged_empty.golden new file mode 100644 index 000000000..b2d49b145 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/unchanged_non-empty.golden new file mode 100644 index 000000000..ff4a6371a --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefault/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/added.golden new file mode 100644 index 000000000..57bb555b7 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 0 -> 1 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/changed.golden new file mode 100644 index 000000000..553434587 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 2 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/removed.golden new file mode 100644 index 000000000..4f9a5c0fd --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 0 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/unchanged_empty.golden new file mode 100644 index 000000000..b2d49b145 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..ff4a6371a --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalDefaultForceNew/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/added.golden new file mode 100644 index 000000000..57bb555b7 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 0 -> 1 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/changed.golden new file mode 100644 index 000000000..553434587 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 2 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/removed.golden new file mode 100644 index 000000000..4f9a5c0fd --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 0 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/unchanged_empty.golden new file mode 100644 index 000000000..b2d49b145 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..ff4a6371a --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/optionalForceNew/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/added.golden new file mode 100644 index 000000000..eb372e44d --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 0 -> 1 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/changed.golden new file mode 100644 index 000000000..f0564af44 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 2 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/removed.golden new file mode 100644 index 000000000..32ac766b7 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: + ~ update in-place + +Terraform will perform the following actions: + + # crossprovider_test_res.example will be updated in-place + ~ resource "crossprovider_test_res" "example" { + id = "newid" + ~ prop = 1 -> 0 + } + +Plan: 0 to add, 1 to change, 0 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + ~ crossprovider:index/testRes:TestRes: (update) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + ~ 1 to update + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/unchanged_empty.golden new file mode 100644 index 000000000..b2d49b145 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/unchanged_non-empty.golden new file mode 100644 index 000000000..ff4a6371a --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/required/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/added.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/added.golden new file mode 100644 index 000000000..57bb555b7 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/added.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 0 -> 1 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 0 => 1 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/changed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/changed.golden new file mode 100644 index 000000000..553434587 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/changed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(2)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 2 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 2 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/removed.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/removed.golden new file mode 100644 index 000000000..4f9a5c0fd --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/removed.golden @@ -0,0 +1,32 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +Terraform used the selected providers to generate the following execution +plan. Resource actions are indicated with the following symbols: ++/- create replacement and then destroy + +Terraform will perform the following actions: + + # crossprovider_test_res.example must be replaced ++/- resource "crossprovider_test_res" "example" { + ~ id = "newid" -> (known after apply) + ~ prop = 1 -> 0 # forces replacement + } + +Plan: 1 to add, 0 to change, 1 to destroy. + +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] + +-crossprovider:index/testRes:TestRes: (replace) + [id=newid] + [urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] + ~ prop: 1 => 0 +Resources: + +-1 to replace + 1 unchanged +`, + detailedDiff: map[string]interface{}{"prop": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/unchanged_empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/unchanged_empty.golden new file mode 100644 index 000000000..b2d49b145 --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/unchanged_empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(0)), + changeValue: valast.Ptr(int64(0)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +} diff --git a/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/unchanged_non-empty.golden b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/unchanged_non-empty.golden new file mode 100644 index 000000000..ff4a6371a --- /dev/null +++ b/pkg/tests/diff_test/testdata/TestSDKv2DetailedDiffInt/requiredForceNew/unchanged_non-empty.golden @@ -0,0 +1,16 @@ +tests.testOutput{ + initialValue: valast.Ptr(int64(1)), + changeValue: valast.Ptr(int64(1)), + tfOut: ` +No changes. Your infrastructure matches the configuration. + +Terraform has compared your real infrastructure against your configuration +and found no differences, so no changes are needed. +`, + pulumiOut: `Previewing update (test): + pulumi:pulumi:Stack: (same) + [urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] +Resources: + 2 unchanged +`, +}