opentofu/internal/command/format
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
..
diagnostic_test.go tfdiags: Treat unknown-related or sensitive-related messages differently 2022-06-23 13:52:23 -07:00
diagnostic.go command/format: Include function call information in diagnostics 2022-06-23 13:52:23 -07:00
diff_test.go Standardise how blank lines are added to plan for unchanged blocks (#31330) 2022-06-30 13:29:47 +01:00
diff.go plans: indicate when resource deleted due to move (#31695) 2022-08-30 18:01:29 +01:00
difflanguage_string.go cli: Refactor resource drift rendering 2021-09-16 15:22:37 -04:00
format.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
object_id_test.go unmark object ID or Name for formatting 2021-08-17 12:24:43 -04:00
object_id.go unmark object ID or Name for formatting 2021-08-17 12:24:43 -04:00
state_test.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
state.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
trivia.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00