Manish Kukreti
Manish Kukreti

Reputation: 69

Not able to delete RDS instance when RDS is associated with continuous backup +Terraform

I have created an RDS database with point in time recovery, backup plan and continuous backup using Terraform.

Now, when i am trying to delete RDS, I am getting this error:

  1. Error Deleting Database Instance, invalid parameter combination, RDS instance is associated with aws backup resource. No delete automated backups must be specified. I then deleted the continuous back up in backup vault, but i believe it does not make sense. RDS should be deleted without deleting continuous backup. Anyway after I deleted it I got the next error.

  2. Error Deleting Database Instance , DB snapshot already exists with same name after that i deleted the snapshot and then finally I was able to delete RDS using terraform.

Upvotes: 1

Views: 7105

Answers (1)

Riz
Riz

Reputation: 1167

When you delete an RDS, it asks you two things.
1: Retain automated backups 2: Create final snapshot? In your case, you faced two issues, one being related to RDS and the other being related to aws backup. In your case you had the option 2(Create final snapshot?) 'enabled' and you already had a snapshot with the name $yourDBname-final-snapshot and that's why the error.
As for your error #1. It clearly says to specify 'No delete automated backups'. And Backup vaults cannot be deleted when there are recovery points.

Upvotes: 0

Related Questions