Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Terraform destroy not working for DB instances in AWS

I used terraform destroy. Then I got this msg and the DB instances are still there.

Error : DB Instance Final Snapshot Identifier is required when a final snapshot is required.

Do I need to create a snapshot. If so is it possible to do it directly in the console ?

like image 912
Alexy Pulivelil Avatar asked Sep 05 '25 03:09

Alexy Pulivelil


1 Answers

You can use the skip_final_snapshot argument to evade this behavior, which is what you implied you are seeking here: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#skip_final_snapshot.

Add that argument with a true value to your aws_db_instance, apply the new config to update the DB instance, and then you can freely destroy without the error requiring the final snapshot.

like image 103
Matt Schuchard Avatar answered Sep 07 '25 19:09

Matt Schuchard