fix show -json tests
The prior state recorded in the plans did not match the actual prior state. Make the plans and state match depending on whether there was existing state or not.
This commit is contained in:
parent
ad5899d8bb
commit
e54949f2e1
|
@ -53,18 +53,7 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"prior_state": {
|
||||
"format_version": "0.1",
|
||||
"values": {
|
||||
"outputs": {
|
||||
"test": {
|
||||
"sensitive": false,
|
||||
"value": "bar"
|
||||
}
|
||||
},
|
||||
"root_module": {}
|
||||
}
|
||||
},
|
||||
"prior_state": {},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "test_instance.test[0]",
|
||||
|
|
|
@ -3,7 +3,12 @@
|
|||
"terraform_version": "0.12.0",
|
||||
"serial": 7,
|
||||
"lineage": "configuredUnchanged",
|
||||
"outputs": {},
|
||||
"outputs": {
|
||||
"test": {
|
||||
"value": "bar",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "managed",
|
||||
|
|
|
@ -3,7 +3,12 @@
|
|||
"terraform_version": "0.12.0",
|
||||
"serial": 7,
|
||||
"lineage": "configuredUnchanged",
|
||||
"outputs": {},
|
||||
"outputs": {
|
||||
"test": {
|
||||
"value": "bar",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "managed",
|
||||
|
|
|
@ -69,18 +69,7 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"prior_state": {
|
||||
"format_version": "0.1",
|
||||
"values": {
|
||||
"outputs": {
|
||||
"test": {
|
||||
"sensitive": false,
|
||||
"value": "baz"
|
||||
}
|
||||
},
|
||||
"root_module": {}
|
||||
}
|
||||
},
|
||||
"prior_state": {},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "module.module_test_bar.test_instance.test",
|
||||
|
|
|
@ -101,20 +101,14 @@
|
|||
"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": {
|
||||
|
|
Loading…
Reference in New Issue