command/jsonplan: "deposed" should be a string, not a bool. (#20351)

This commit is contained in:
Kristin Laemmert 2019-02-19 13:55:49 -08:00 committed by GitHub
parent 818b4ec068
commit c59a274e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 8 deletions

View File

@ -242,7 +242,9 @@ func (p *plan) marshalResourceChanges(changes *plans.Changes, schemas *terraform
AfterUnknown: a, AfterUnknown: a,
} }
r.Deposed = rc.DeposedKey == states.NotDeposed if rc.DeposedKey != states.NotDeposed {
r.Deposed = rc.DeposedKey.String()
}
key := addr.Resource.Key key := addr.Resource.Key
if key != nil { if key != nil {

View File

@ -56,7 +56,7 @@ type resourceChange struct {
// "deposed", if set, indicates that this action applies to a "deposed" // "deposed", if set, indicates that this action applies to a "deposed"
// object of the given instance rather than to its "current" object. Omitted // object of the given instance rather than to its "current" object. Omitted
// for changes to the current object. // for changes to the current object.
Deposed bool `json:"deposed,omitempty"` Deposed string `json:"deposed,omitempty"`
// Change describes the change that will be made to this object // Change describes the change that will be made to this object
Change change `json:"change,omitempty"` Change change `json:"change,omitempty"`

View File

@ -60,7 +60,6 @@
"mode": "managed", "mode": "managed",
"type": "test_instance", "type": "test_instance",
"name": "test", "name": "test",
"deposed": true,
"change": { "change": {
"actions": [ "actions": [
"create" "create"
@ -81,7 +80,6 @@
"mode": "managed", "mode": "managed",
"type": "test_instance", "type": "test_instance",
"name": "test", "name": "test",
"deposed": true,
"change": { "change": {
"actions": [ "actions": [
"create" "create"
@ -102,7 +100,6 @@
"mode": "managed", "mode": "managed",
"type": "test_instance", "type": "test_instance",
"name": "test", "name": "test",
"deposed": true,
"change": { "change": {
"actions": [ "actions": [
"create" "create"

View File

@ -35,7 +35,6 @@
"mode": "managed", "mode": "managed",
"type": "test_instance", "type": "test_instance",
"name": "test", "name": "test",
"deposed": true,
"change": { "change": {
"actions": [ "actions": [
"update" "update"
@ -59,7 +58,6 @@
"mode": "managed", "mode": "managed",
"type": "test_instance", "type": "test_instance",
"name": "test-delete", "name": "test-delete",
"deposed": true,
"change": { "change": {
"actions": [ "actions": [
"delete" "delete"

View File

@ -35,7 +35,6 @@
"mode": "managed", "mode": "managed",
"type": "test_instance", "type": "test_instance",
"name": "test", "name": "test",
"deposed": true,
"change": { "change": {
"actions": [ "actions": [
"no-op" "no-op"