Skip to content

PlanResourceChange can't indicate whether it is for a "recreate" #350

@magodo

Description

@magodo

terraform-plugin-go version

v0.19.0

Use cases

See:

Long to short, we have a resource, whose name is globally unique, which means creating this resource with an existing name would fail. So we want to add validation in plan time, by using the "CustomizeDiff" (SDKv2) or "ModifyPlan" (FW). It works fine for most cases, whilst if the resource is tainted, the plan will fail (at least for CustomizeDiff), in that the state is nil and the plan will have the name set to the existing name, with that resource still existed (not deleted yet).

Attempted solutions

Proposal

I don't have a comprehensive proposal here, whilst I'd like to ask for a way to meet the requirement above, any suggestion would also be appreciated!

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions