Resource review

In this tutorial, we:

  • Created an Azure resource group to organize our web app components.
  • Created an Azure virtual network that lets us connect our resources to the internet.
  • Created an Azure virtual machine with a public IP address and a network interface.
  • Created an Azure SQL server and connected it to our virtual network.

You now have the basic infrastructure for a simple web app! And, because the infrastructure is defined as code, you can recreate this exact set of resources in any environment with the same configuration script.

Delete resources

Delete, or destroy, the resources we created in this tutorial to avoid any unexpected Azure charges.

  1. In your terminal, run the following command:

     terraform destroy
    

    This command tells you which resources Terraform will destroy.

  2. Enter yes to confirm that you want to destroy these resources.

    terraform-destroy-confirm
    terraform destroy confirmation message

A message appears when Terraform successfully destroys your resources.

terraform-destroy-complete
terraform apply completion message

Explore other projects

Updated: