jckuester / awsweeper

A tool for cleaning your AWS account
Mozilla Public License 2.0
480 stars 46 forks source link

aws_db_instance: FAILED TO DELETE THE FOLLOWING RESOURCES (RETRIES EXCEEDED): 1 #121

Open thenervousgeek opened 3 years ago

thenervousgeek commented 3 years ago

image

Timeout error while deleting mysql database. But the database does get deleted. 😄

jckuester commented 3 years ago

Hi @thenervousgeek,

let my try to explain this timeout parameter: I originally added a configurable timeout so that awsweeper doesn't get blocked for too long when trying to delete resources which cannot be deleted, because they still have dependencies (for example, a VPC still having subnets with instances, which need to be deleted first).

The timeout unfortunately has some cases where it gives rather confusing feedback to the user: in your case awsweeper waits (more accurately, the Terraform AWS Provider underneath that awsweeper uses to delete resources) until the state of a DB instance is DELETED (this takes quite some time and therefore runs into a timeout). When the timeouts occurs the deletion is already in process and will continue in the background.