mirror of
https://github.com/hashicorp/terraform.git
synced 2026-04-22 06:40:42 -04:00
Configuration-driven moves are represented in the plan file by setting the resource's `PrevRunAddr` to a different value than its `Addr`. For JSON plan output, we here add a new field to resource changes, `previous_address`, which is present and non-empty only if the resource is planned to be moved. Like the CLI UI, refresh-only plans will include move-only changes in the resource drift JSON output. In normal plan mode, these are elided to avoid redundancy with planned changes.
23 lines
588 B
JSON
23 lines
588 B
JSON
{
|
|
"version": 4,
|
|
"terraform_version": "0.12.0",
|
|
"serial": 7,
|
|
"lineage": "configuredUnchanged",
|
|
"resources": [
|
|
{
|
|
"mode": "managed",
|
|
"type": "test_instance",
|
|
"name": "foo",
|
|
"provider": "provider[\"registry.terraform.io/hashicorp/test\"]",
|
|
"instances": [
|
|
{
|
|
"schema_version": 0,
|
|
"attributes": {
|
|
"ami": "foo",
|
|
"id": "placeholder"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|