Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plans: indicate when resource deleted due to move #31695

Merged
merged 1 commit into from Aug 30, 2022
Merged

Commits on Aug 30, 2022

  1. plans: indicate when resource deleted due to move

    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.
    kmoe committed Aug 30, 2022
    Copy the full SHA
    aee13f7 View commit details
    Browse the repository at this point in the history