Skip to content

[Enhancement]: Simplify deleting aws_sns_topic with archive_policy #38885

@t0yv0

Description

@t0yv0

Description

Per AWS documentation deleting SNS topics with archive_policy is not allowed.

To avoid accidental message deletions, you can not delete a topic with an active message archive policy. The topic's message archive policy must be deactivated before the topic can be deleted. When you deactivate a message archive policy, Amazon SNS deletes all of the archived messages. When deleting a topic, subscriptions are removed, and any messages in transit may not be delivered.

This makes it cumbersome to manage deletion of such resources with TF. Consider implementing a feature that automates deactivating the archive policy on deletion (possibly as an opt-in and not default behavior).

Affected Resource(s) and/or Data Source(s)

  • aws_sns_policy

Potential Terraform Configuration

N/A

References

N/A

Would you like to implement a fix?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequests to existing resources that expand the functionality or scope.service/snsIssues and PRs that pertain to the sns service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions