Cleanup

Optionally, you can cleanup the resources that you created.

Remove the Resources

You can remove the resources that you created with the terraform.tfvars file by running the command destroy.

  1. On the computer where you installed Terraform, go to the directory that contains the terraform.tfvars file.
  2. Enter the following command:
    terraform destroy
    Terraform displays the details of the resources that will be destroyed, as shown in this example:
    Plan: 0 to add, 0 to change, 26 to destroy.
  3. At the prompt Do you really want to destroy all resources?, enter yes
    As Terraform removes each resource, it displays the status of the operation.
    After all the resources are removed, the message Destroy complete is displayed, along with the number of resources destroyed, as shown in the following example:
    Destroy complete! Resources: 26 destroyed.