hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.84k stars 9.19k forks source link

Implement aws_sns_topic Sweeper #12658

Closed bflad closed 4 years ago

bflad commented 4 years ago

Community Note

Description

The acceptance testing can leave lingering resources on failed runs (e.g. via coding issues during development or panics). These lingering resources can cause quota limits to be reached, extraneous money to be spent, or in some worst cases leave open security risks in the testing account.

We do not require sweeper implementation during initial resource implementation at this time, but this may change in the future when the process can be simplified and documented better.

e.g. after many years of daily (or more) testing runs

$ aws sns list-topics | jq '.Topics | length'
155

This resource sweeper should have dependencies on upstream resources, e.g. (some sweepers may not be implemented)

New or Affected Resource(s)

Definition of Done

$ aws sns list-topics | jq '.Topics | length'
0
ewbankkit commented 4 years ago

These upstream resources require sweepers added:

Also aws_backup_vault_notifications added via https://github.com/terraform-providers/terraform-provider-aws/pull/12501.

ewbankkit commented 4 years ago

As a follow on, use the new internal waiters package added for aws_db_event_subscription etc. in the main resource code.

ghost commented 4 years ago

This has been released in version 2.62.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!