mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-02-03 03:00:16 -05:00
* command/jsonstate: fix inconsistency with resource address Resource addresses in state output were not including index for instances created with for_each or count, while the index was appearing in the plan output. This PR fixes that inconsistency, adds tests, and updates the existing tests. Fixes #24110 * add tests showing expected prior state resource addressing * added example of show json state output with modules
37 lines
1.1 KiB
JSON
37 lines
1.1 KiB
JSON
{
|
|
"format_version": "0.1",
|
|
"terraform_version": "0.12.0",
|
|
"values": {
|
|
"root_module": {
|
|
"resources": [
|
|
{
|
|
"address": "test_instance.example[0]",
|
|
"mode": "managed",
|
|
"type": "test_instance",
|
|
"name": "example",
|
|
"index": 0,
|
|
"provider_name": "test",
|
|
"schema_version": 0,
|
|
"values": {
|
|
"ami": null,
|
|
"id": "621124146446964903"
|
|
}
|
|
},
|
|
{
|
|
"address": "test_instance.example[1]",
|
|
"mode": "managed",
|
|
"type": "test_instance",
|
|
"name": "example",
|
|
"index": 1,
|
|
"provider_name": "test",
|
|
"schema_version": 0,
|
|
"values": {
|
|
"ami": null,
|
|
"id": "4330206298367988603"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|