2019-01-12 00:13:55 +01:00
|
|
|
{
|
2021-09-09 17:25:35 +02:00
|
|
|
"format_version": "0.2",
|
2019-02-11 22:17:03 +01:00
|
|
|
"variables": {
|
|
|
|
"test_var": {
|
|
|
|
"value": "bar"
|
|
|
|
}
|
|
|
|
},
|
2019-01-12 00:13:55 +01:00
|
|
|
"planned_values": {
|
|
|
|
"outputs": {
|
|
|
|
"test": {
|
|
|
|
"sensitive": false,
|
|
|
|
"value": "bar"
|
|
|
|
}
|
|
|
|
},
|
mildwonkey/b-show-state (#20032)
* command/show: properly marshal attribute values to json
marshalAttributeValues in jsonstate and jsonplan packages was returning
a cty.Value, which json/encoding could not marshal. These functions now
convert those cty.Values into json.RawMessages.
* command/jsonplan: planned values should include resources that are not changing
* command/jsonplan: return a filtered list of proposed 'after' attributes
Previously, proposed 'after' attributes were not being shown if the
attributes were not WhollyKnown. jsonplan now iterates through all the
`after` attributes, omitting those which are not wholly known.
The same was roughly true for after_unknown, and that structure is now
correctly populated. In the future we may choose to filter the
after_unknown structure to _only_ display unknown attributes, instead of
all attributes.
* command/jsonconfig: use a unique key for providers so that aliased
providers don't get munged together
This now uses the same "provider" key from configs.Module, e.g.
`providername.provideralias`.
* command/jsonplan: unknownAsBool needs to iterate through objects that are not wholly known
* command/jsonplan: properly display actions as strings according to the RFC,
instead of a plans.Action string.
For example:
a plans.Action string DeleteThenCreate should be displayed as ["delete",
"create"]
Tests have been updated to reflect this.
* command/jsonplan: return "null" for unknown list items.
The length of a list could be meaningful on its own, so we will turn
unknowns into "null". The same is less likely true for maps and objects,
so we will continue to omit unknown values from those.
2019-01-23 20:46:53 +01:00
|
|
|
"root_module": {
|
|
|
|
"resources": [
|
|
|
|
{
|
|
|
|
"address": "test_instance.test",
|
|
|
|
"mode": "managed",
|
|
|
|
"type": "test_instance",
|
|
|
|
"name": "test",
|
2020-04-02 18:58:44 +02:00
|
|
|
"provider_name": "registry.terraform.io/hashicorp/test",
|
mildwonkey/b-show-state (#20032)
* command/show: properly marshal attribute values to json
marshalAttributeValues in jsonstate and jsonplan packages was returning
a cty.Value, which json/encoding could not marshal. These functions now
convert those cty.Values into json.RawMessages.
* command/jsonplan: planned values should include resources that are not changing
* command/jsonplan: return a filtered list of proposed 'after' attributes
Previously, proposed 'after' attributes were not being shown if the
attributes were not WhollyKnown. jsonplan now iterates through all the
`after` attributes, omitting those which are not wholly known.
The same was roughly true for after_unknown, and that structure is now
correctly populated. In the future we may choose to filter the
after_unknown structure to _only_ display unknown attributes, instead of
all attributes.
* command/jsonconfig: use a unique key for providers so that aliased
providers don't get munged together
This now uses the same "provider" key from configs.Module, e.g.
`providername.provideralias`.
* command/jsonplan: unknownAsBool needs to iterate through objects that are not wholly known
* command/jsonplan: properly display actions as strings according to the RFC,
instead of a plans.Action string.
For example:
a plans.Action string DeleteThenCreate should be displayed as ["delete",
"create"]
Tests have been updated to reflect this.
* command/jsonplan: return "null" for unknown list items.
The length of a list could be meaningful on its own, so we will turn
unknowns into "null". The same is less likely true for maps and objects,
so we will continue to omit unknown values from those.
2019-01-23 20:46:53 +01:00
|
|
|
"schema_version": 0,
|
|
|
|
"values": {
|
|
|
|
"ami": "bar",
|
2019-02-08 20:58:08 +01:00
|
|
|
"id": "placeholder"
|
2021-06-14 15:19:13 +02:00
|
|
|
},
|
|
|
|
"sensitive_values": {}
|
mildwonkey/b-show-state (#20032)
* command/show: properly marshal attribute values to json
marshalAttributeValues in jsonstate and jsonplan packages was returning
a cty.Value, which json/encoding could not marshal. These functions now
convert those cty.Values into json.RawMessages.
* command/jsonplan: planned values should include resources that are not changing
* command/jsonplan: return a filtered list of proposed 'after' attributes
Previously, proposed 'after' attributes were not being shown if the
attributes were not WhollyKnown. jsonplan now iterates through all the
`after` attributes, omitting those which are not wholly known.
The same was roughly true for after_unknown, and that structure is now
correctly populated. In the future we may choose to filter the
after_unknown structure to _only_ display unknown attributes, instead of
all attributes.
* command/jsonconfig: use a unique key for providers so that aliased
providers don't get munged together
This now uses the same "provider" key from configs.Module, e.g.
`providername.provideralias`.
* command/jsonplan: unknownAsBool needs to iterate through objects that are not wholly known
* command/jsonplan: properly display actions as strings according to the RFC,
instead of a plans.Action string.
For example:
a plans.Action string DeleteThenCreate should be displayed as ["delete",
"create"]
Tests have been updated to reflect this.
* command/jsonplan: return "null" for unknown list items.
The length of a list could be meaningful on its own, so we will turn
unknowns into "null". The same is less likely true for maps and objects,
so we will continue to omit unknown values from those.
2019-01-23 20:46:53 +01:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2019-01-12 00:13:55 +01:00
|
|
|
},
|
|
|
|
"resource_changes": [
|
|
|
|
{
|
|
|
|
"address": "test_instance.test",
|
|
|
|
"mode": "managed",
|
|
|
|
"type": "test_instance",
|
2020-04-02 18:58:44 +02:00
|
|
|
"provider_name": "registry.terraform.io/hashicorp/test",
|
2019-01-12 00:13:55 +01:00
|
|
|
"name": "test",
|
|
|
|
"change": {
|
|
|
|
"actions": [
|
mildwonkey/b-show-state (#20032)
* command/show: properly marshal attribute values to json
marshalAttributeValues in jsonstate and jsonplan packages was returning
a cty.Value, which json/encoding could not marshal. These functions now
convert those cty.Values into json.RawMessages.
* command/jsonplan: planned values should include resources that are not changing
* command/jsonplan: return a filtered list of proposed 'after' attributes
Previously, proposed 'after' attributes were not being shown if the
attributes were not WhollyKnown. jsonplan now iterates through all the
`after` attributes, omitting those which are not wholly known.
The same was roughly true for after_unknown, and that structure is now
correctly populated. In the future we may choose to filter the
after_unknown structure to _only_ display unknown attributes, instead of
all attributes.
* command/jsonconfig: use a unique key for providers so that aliased
providers don't get munged together
This now uses the same "provider" key from configs.Module, e.g.
`providername.provideralias`.
* command/jsonplan: unknownAsBool needs to iterate through objects that are not wholly known
* command/jsonplan: properly display actions as strings according to the RFC,
instead of a plans.Action string.
For example:
a plans.Action string DeleteThenCreate should be displayed as ["delete",
"create"]
Tests have been updated to reflect this.
* command/jsonplan: return "null" for unknown list items.
The length of a list could be meaningful on its own, so we will turn
unknowns into "null". The same is less likely true for maps and objects,
so we will continue to omit unknown values from those.
2019-01-23 20:46:53 +01:00
|
|
|
"no-op"
|
2019-01-12 00:13:55 +01:00
|
|
|
],
|
|
|
|
"before": {
|
|
|
|
"ami": "bar",
|
2019-02-08 20:58:08 +01:00
|
|
|
"id": "placeholder"
|
2019-01-12 00:13:55 +01:00
|
|
|
},
|
|
|
|
"after": {
|
|
|
|
"ami": "bar",
|
2019-02-08 20:58:08 +01:00
|
|
|
"id": "placeholder"
|
2019-01-12 00:13:55 +01:00
|
|
|
},
|
2021-03-25 16:41:49 +01:00
|
|
|
"after_unknown": {},
|
|
|
|
"after_sensitive": {},
|
|
|
|
"before_sensitive": {}
|
2019-01-12 00:13:55 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"output_changes": {
|
|
|
|
"test": {
|
|
|
|
"actions": [
|
2020-10-10 01:45:31 +02:00
|
|
|
"no-op"
|
2019-01-12 00:13:55 +01:00
|
|
|
],
|
2020-10-10 01:45:31 +02:00
|
|
|
"before": "bar",
|
2019-01-12 00:13:55 +01:00
|
|
|
"after": "bar",
|
2021-03-27 00:21:40 +01:00
|
|
|
"after_unknown": false,
|
|
|
|
"before_sensitive": false,
|
|
|
|
"after_sensitive": false
|
2019-01-12 00:13:55 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"prior_state": {
|
2021-09-09 17:25:35 +02:00
|
|
|
"format_version": "0.2",
|
2019-01-12 00:13:55 +01:00
|
|
|
"values": {
|
2019-06-05 13:29:02 +02:00
|
|
|
"outputs": {
|
|
|
|
"test": {
|
|
|
|
"sensitive": false,
|
|
|
|
"value": "bar"
|
|
|
|
}
|
|
|
|
},
|
2019-01-12 00:13:55 +01:00
|
|
|
"root_module": {
|
|
|
|
"resources": [
|
|
|
|
{
|
|
|
|
"address": "test_instance.test",
|
|
|
|
"mode": "managed",
|
|
|
|
"type": "test_instance",
|
|
|
|
"name": "test",
|
2019-02-12 21:03:07 +01:00
|
|
|
"schema_version": 0,
|
2020-04-02 18:58:44 +02:00
|
|
|
"provider_name": "registry.terraform.io/hashicorp/test",
|
2019-01-12 00:13:55 +01:00
|
|
|
"values": {
|
2019-02-12 21:03:07 +01:00
|
|
|
"ami": "bar",
|
|
|
|
"id": "placeholder"
|
2021-06-14 15:19:13 +02:00
|
|
|
},
|
|
|
|
"sensitive_values": {}
|
2019-01-12 00:13:55 +01:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"configuration": {
|
|
|
|
"root_module": {
|
|
|
|
"outputs": {
|
|
|
|
"test": {
|
|
|
|
"expression": {
|
|
|
|
"references": [
|
|
|
|
"var.test_var"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"resources": [
|
|
|
|
{
|
|
|
|
"address": "test_instance.test",
|
|
|
|
"mode": "managed",
|
|
|
|
"type": "test_instance",
|
|
|
|
"name": "test",
|
2019-02-20 23:27:49 +01:00
|
|
|
"provider_config_key": "test",
|
2019-01-12 00:13:55 +01:00
|
|
|
"schema_version": 0,
|
2019-02-12 21:03:07 +01:00
|
|
|
"expressions": {
|
|
|
|
"ami": {
|
|
|
|
"references": [
|
|
|
|
"var.test_var"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2019-01-12 00:13:55 +01:00
|
|
|
}
|
2019-02-12 21:03:07 +01:00
|
|
|
],
|
|
|
|
"variables": {
|
|
|
|
"test_var": {
|
|
|
|
"default": "bar"
|
|
|
|
}
|
|
|
|
}
|
2019-01-12 00:13:55 +01:00
|
|
|
}
|
|
|
|
}
|
2020-04-02 18:58:44 +02:00
|
|
|
}
|