- Home
- CDN Simulator
- Teardown
Teardown
When the lab session is complete, destroy all Azure resources to stop billing.
Terraform Destroy
Section titled “Terraform Destroy”From the directory containing the Terraform configuration:
# Review what will be destroyedterraform plan -destroy
# Destroy all resourcesterraform destroyTerraform will prompt for confirmation. Type yes to proceed.
Verify Cleanup
Section titled “Verify Cleanup”Confirm all resources have been removed:
# Check resource group is goneaz group show --name "$(terraform output -raw resource_group_name)" 2>&1 \ | grep -q "ResourceGroupNotFound" \ && echo "Resource group deleted" \ || echo "Resource group still exists"Clean Up Local State
Section titled “Clean Up Local State”Remove Terraform state and cached files:
rm -rf .terraform .terraform.lock.hcl terraform.tfstate terraform.tfstate.backupRevert DNS/Hosts Changes
Section titled “Revert DNS/Hosts Changes”If you modified DNS or hosts files during integration, revert those changes:
# Remove hosts file entry (Linux/macOS)sudo sed -i '/<CDN_EDGE_PUBLIC_IP>/d' /etc/hostsIf you created a DNS A record, delete it through your DNS provider.