command/jsonplan: "deposed" should be a string, not a bool. (#20351)
This commit is contained in:
parent
818b4ec068
commit
c59a274e96
|
@ -242,7 +242,9 @@ func (p *plan) marshalResourceChanges(changes *plans.Changes, schemas *terraform
|
|||
AfterUnknown: a,
|
||||
}
|
||||
|
||||
r.Deposed = rc.DeposedKey == states.NotDeposed
|
||||
if rc.DeposedKey != states.NotDeposed {
|
||||
r.Deposed = rc.DeposedKey.String()
|
||||
}
|
||||
|
||||
key := addr.Resource.Key
|
||||
if key != nil {
|
||||
|
|
|
@ -56,7 +56,7 @@ type resourceChange struct {
|
|||
// "deposed", if set, indicates that this action applies to a "deposed"
|
||||
// object of the given instance rather than to its "current" object. Omitted
|
||||
// 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 change `json:"change,omitempty"`
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
"mode": "managed",
|
||||
"type": "test_instance",
|
||||
"name": "test",
|
||||
"deposed": true,
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
|
@ -81,7 +80,6 @@
|
|||
"mode": "managed",
|
||||
"type": "test_instance",
|
||||
"name": "test",
|
||||
"deposed": true,
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
|
@ -102,7 +100,6 @@
|
|||
"mode": "managed",
|
||||
"type": "test_instance",
|
||||
"name": "test",
|
||||
"deposed": true,
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
"mode": "managed",
|
||||
"type": "test_instance",
|
||||
"name": "test",
|
||||
"deposed": true,
|
||||
"change": {
|
||||
"actions": [
|
||||
"update"
|
||||
|
@ -59,7 +58,6 @@
|
|||
"mode": "managed",
|
||||
"type": "test_instance",
|
||||
"name": "test-delete",
|
||||
"deposed": true,
|
||||
"change": {
|
||||
"actions": [
|
||||
"delete"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
"mode": "managed",
|
||||
"type": "test_instance",
|
||||
"name": "test",
|
||||
"deposed": true,
|
||||
"change": {
|
||||
"actions": [
|
||||
"no-op"
|
||||
|
|
Loading…
Reference in New Issue