I used Terraform to bring up an AWS RDS SQL Server DB with deletion_protection set to true. Now, I am trying to delete the database and hence I tried to first run {terraform apply} with deletion_protection set to false, and I got the following error:
Error: error deleting Database Instance "awsworkerdb-green": InvalidParameterCombination: Cannot delete protected DB Instance, please disable deletion protection and try again.
status code: 400, request id: 7e787deb-af03-4016-9baa-471ab9c0ae1c
Then I tried to directly do {terraform destroy} using the same TF code with deletion_protection set to false, I got the following error:
Error: error deleting Database Instance "awsworkerdb-green": InvalidParameterCombination: Cannot delete protected DB Instance, please disable deletion protection and try again.
status code: 400, request id: 9a95ef70-8738-4a31-b0cd-cf10ef05bdec
How does one go about deleting this database instance using terraform?