From 3b3ff98356fb9b8dd15d361433b8a84456637544 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Mon, 21 Sep 2020 14:39:25 -0400 Subject: [PATCH] Revert "fix show -json tests" This reverts commit e54949f2e1cbd62d0401f7d2b7b7d2f34735cbfc. Changes incorrectly applied to the planned state tests --- command/testdata/show-json/basic-create/output.json | 13 ++++++++++++- .../show-json/basic-delete/terraform.tfstate | 7 +------ .../show-json/basic-update/terraform.tfstate | 7 +------ command/testdata/show-json/modules/output.json | 13 ++++++++++++- .../show-json/multi-resource-update/output.json | 8 +++++++- 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/command/testdata/show-json/basic-create/output.json b/command/testdata/show-json/basic-create/output.json index 19e1846cc..ff83de3fe 100644 --- a/command/testdata/show-json/basic-create/output.json +++ b/command/testdata/show-json/basic-create/output.json @@ -53,7 +53,18 @@ ] } }, - "prior_state": {}, + "prior_state": { + "format_version": "0.1", + "values": { + "outputs": { + "test": { + "sensitive": false, + "value": "bar" + } + }, + "root_module": {} + } + }, "resource_changes": [ { "address": "test_instance.test[0]", diff --git a/command/testdata/show-json/basic-delete/terraform.tfstate b/command/testdata/show-json/basic-delete/terraform.tfstate index 6d2b62237..ac865b864 100644 --- a/command/testdata/show-json/basic-delete/terraform.tfstate +++ b/command/testdata/show-json/basic-delete/terraform.tfstate @@ -3,12 +3,7 @@ "terraform_version": "0.12.0", "serial": 7, "lineage": "configuredUnchanged", - "outputs": { - "test": { - "value": "bar", - "type": "string" - } - }, + "outputs": {}, "resources": [ { "mode": "managed", diff --git a/command/testdata/show-json/basic-update/terraform.tfstate b/command/testdata/show-json/basic-update/terraform.tfstate index bc691aee0..b57f60f84 100644 --- a/command/testdata/show-json/basic-update/terraform.tfstate +++ b/command/testdata/show-json/basic-update/terraform.tfstate @@ -3,12 +3,7 @@ "terraform_version": "0.12.0", "serial": 7, "lineage": "configuredUnchanged", - "outputs": { - "test": { - "value": "bar", - "type": "string" - } - }, + "outputs": {}, "resources": [ { "mode": "managed", diff --git a/command/testdata/show-json/modules/output.json b/command/testdata/show-json/modules/output.json index 76b4f471c..898763aad 100644 --- a/command/testdata/show-json/modules/output.json +++ b/command/testdata/show-json/modules/output.json @@ -69,7 +69,18 @@ ] } }, - "prior_state": {}, + "prior_state": { + "format_version": "0.1", + "values": { + "outputs": { + "test": { + "sensitive": false, + "value": "baz" + } + }, + "root_module": {} + } + }, "resource_changes": [ { "address": "module.module_test_bar.test_instance.test", diff --git a/command/testdata/show-json/multi-resource-update/output.json b/command/testdata/show-json/multi-resource-update/output.json index ba764b265..cc8f6d1ed 100644 --- a/command/testdata/show-json/multi-resource-update/output.json +++ b/command/testdata/show-json/multi-resource-update/output.json @@ -101,14 +101,20 @@ "format_version": "0.1", "terraform_version": "0.13.0", "values": { + "outputs": { + "test": { + "sensitive": false, + "value": "bar" + } + }, "root_module": { "resources": [ { "address": "test_instance.test[0]", - "index": 0, "mode": "managed", "type": "test_instance", "name": "test", + "index": 0, "provider_name": "registry.terraform.io/hashicorp/test", "schema_version": 0, "values": {