mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-02-18 22:00:36 -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
35 lines
934 B
JSON
35 lines
934 B
JSON
{
|
|
"version": 4,
|
|
"terraform_version": "0.12.0",
|
|
"serial": 1,
|
|
"lineage": "00bfda35-ad61-ec8d-c013-14b0320bc416",
|
|
"outputs": {},
|
|
"resources": [
|
|
{
|
|
"mode": "managed",
|
|
"type": "test_instance",
|
|
"name": "example",
|
|
"each": "list",
|
|
"provider": "provider.test",
|
|
"instances": [
|
|
{
|
|
"index_key": 0,
|
|
"schema_version": 0,
|
|
"attributes": {
|
|
"id": "621124146446964903"
|
|
},
|
|
"private": "bnVsbA=="
|
|
},
|
|
{
|
|
"index_key": 1,
|
|
"schema_version": 0,
|
|
"attributes": {
|
|
"id": "4330206298367988603"
|
|
},
|
|
"private": "bnVsbA=="
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|