How to Delete all Resources Except One in Terraform
If you need to delete all resources created by Terraform, except for a single, specific one, then you can do the following:
Step 1 – Get the current state list
|
|
Step 2 – Remove the exception resource
Remove the specific resource that you don’t want Terraform to track anymore.
|
|
Step 3 – Destroy the resources
|
|