cyrf
cyrf

Reputation: 6043

how to clean up aws resources with terraform state file

How can I delete all AWS resources described in a terraform state file stored in S3?

I am using CDKTF and I find myself in a scenario frequently- I have evolved my Typescript code beyond what was last used for the serialized "plan".

For example, I decided to change the name of my stack, which resulted in a different name for my state file, so I have multiple state files describing AWS resources at different points during my refactoring.

Often my goal is to just start over and delete everything.

Upvotes: 0

Views: 1271

Answers (1)

Mathew
Mathew

Reputation: 59

terraform destroy -state= will cleanup the resources.

Upvotes: 0

Related Questions