From the course: Introduction to Terraform on Google Cloud Platform
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Cleaning up: Terraform Destroy
From the course: Introduction to Terraform on Google Cloud Platform
Cleaning up: Terraform Destroy
- [Narrator] Since we're working with real cloud resources, we should be sure to clean up to avoid paying for resources that aren't being used. The great thing about Terraform is that we can freely delete all the infrastructure we've defined and still deploy it later from the same code. So you'll be able to come back to this code later if you like. To delete everything we've just done, go to the Settings page and scroll down to Destruction and Deletion, and then we'll scroll down a little bit to this Manually Destroy section and click Queue Destroy Plan. Now, they make this a little bit intimidating for a reason because if you ran this in the wrong place, you could quite easily destroy your entire infrastructure and that could result in loss of data and state. But in our case, we don't need to preserve anything here. So I need to type in the name of the workspace and click Queue Destroy Plan. Just be extra careful when you do this and make sure you're deleting the correct one. Now…