Skip to content

Don't show changes outside of Terraform for cross-resource move operations #36796

@jbardin

Description

@jbardin

Providers may choose to implement MoveResourceState by only transferring the identifying attributes from the source resource state, leaving Terraform to fill in the remainder during the next ReadResource RPC. Functionally this can work fine for providers, and requires less work than mapping the schema-less previous state to the new resource (far less work if there are major structural changes between the resources). Reading the state in during plan however leaves Terraform with the problem of reconciling the minimal prior state against the new state for the CLI output. The changes are always collected, and we only surface them when they contribute to other changes in the plan, but they could still produce significant output for large resources because we must show the entire resource change rather than individual attributes, and that change is effectively the entire resource state.

What we could do is try and see if there is a way to disconnect the contributing changes feature from resources which have been moved between resource types. We don't want to disable the contributing changes output in all move cases however, because a simple move between configuration addresses should be completely transparent, and unexpected changes contributing to the plan would still be desired in the output.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions