Skip to content

Feature proposal: Allow providers to review planned resource deletion #30140

@gdavison

Description

@gdavison

Use-cases

Terraform currently does not involve providers during the plan when deleting a resource. In most cases, this is a reasonable approach. However, there are some resources where deletion can have severe consequences, and it would be useful for the provider to warn the practitioner.

For example, a recent Slack outage was caused in part by the deletion of a resource related to DNSSEC in AWS's Route 53 DNS service. AWS documentation warns that there are several steps to follow, including waiting for DNS records with a typical TTL of 48 hours to propagate. The AWS console also includes this warning. The AWS provider, however, will happily delete the resource.

If Terraform were to call the provider when planning the deletion of a resource, the AWS provider would be able to present a warning to the practitioner.

Attempted Solutions

We will be updating the AWS provider documentation, though this may not be consulted at plan or apply time.

Proposal

Allow a resource to add a deletion plan hook where a warning or error can be returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions