opentofu/internal/plans
kmoe dec48a8510
plans: indicate when resource deleted due to move (#31695)
Add a new ChangeReason, ReasonDeleteBecauseNoMoveTarget, to provide better
information in cases where a planned deletion is due to moving a resource to
a target not in configuration.

Consider a case in which a resource instance exists in state at address A, and
the user adds a moved block to move A to address B. Whether by the user's
intention or not, address B does not exist in configuration.
Terraform combines the move from A to B, and the lack of configuration for B,
into a single delete action for the (previously nonexistent) entity B.
Prior to this commit, the Terraform plan will report that resource B will be
destroyed because it does not exist in configuration, without explicitly
connecting this to the move.

This commit provides the user an additional clue as to what has happened, in a
case in which Terraform has elided a user's action and inaction into one
potentially destructive change.
2022-08-30 18:01:29 +01:00
..
internal/planproto plans: indicate when resource deleted due to move (#31695) 2022-08-30 18:01:29 +01:00
objchange two more locations where Attribute.Type was used 2022-08-04 17:17:00 -04:00
planfile plans: indicate when resource deleted due to move (#31695) 2022-08-30 18:01:29 +01:00
action_string.go Move plans/ to internal/plans/ 2021-05-17 14:09:07 -07:00
action.go Move plans/ to internal/plans/ 2021-05-17 14:09:07 -07:00
changes_src.go command: Render "moved" annotations in plan UI 2021-09-03 17:44:07 -04:00
changes_state.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
changes_sync.go core: Use DynamicExpand even for root module outputs 2022-07-22 15:25:22 -07:00
changes_test.go command: Render "moved" annotations in plan UI 2021-09-03 17:44:07 -04:00
changes.go plans: indicate when resource deleted due to move (#31695) 2022-08-30 18:01:29 +01:00
doc.go Move plans/ to internal/plans/ 2021-05-17 14:09:07 -07:00
dynamic_value.go Move plans/ to internal/plans/ 2021-05-17 14:09:07 -07:00
mode_string.go Move plans/ to internal/plans/ 2021-05-17 14:09:07 -07:00
mode.go Move plans/ to internal/plans/ 2021-05-17 14:09:07 -07:00
plan_test.go Move plans/ to internal/plans/ 2021-05-17 14:09:07 -07:00
plan.go core: Use the new checks package for condition tracking 2022-08-26 15:47:29 -07:00
resourceinstancechangeactionreason_string.go plans: indicate when resource deleted due to move (#31695) 2022-08-30 18:01:29 +01:00