We have built, configured, secured, and tagged a complete Azure environment over the past four posts. Now it's time to tear it all down, and doing this properly is just as much an admin skill as building it up.
Step 1: Remove the Delete Lock
Remember the Delete lock we added to guided-project-vm in Part 4? It will block deletion if we do not remove it first. Locks have to go before resources do.
Step 1: Log in to Microsoft Azure
In the Azure portal, search for Virtual machines and
Step 2: Select guided-project-vm. Under Settings,
Step 3: Select Locks. On the VM-delete-lock row,
Step 4: click Delete,
Step 5: Then confirm.
Step 2: Delete the Project Resource Group
Here is where resource groups really earn their keep. Instead of deleting each resource individually, deleting the resource group wipes everything inside it at once: the VM, VNet, NSG, storage account, all of it.
Search for Resource groups.
Step 1: Select guided-project-rg.
Step 2: Click Delete resource group.
Step 3: Check Apply force delete - to handle any running resources like the VM. Step 4: Type guided-project-rg in the confirmation box, and next Step click Delete. Step 5: Then confirm.
Deletion takes around 5 minutes. Refresh the resource groups list periodically until guided-project-rg disappears.
Step 3: Delete NetworkWatcherRG (If Applicable)
Azure may have automatically created a NetworkWatcherRG resource group when you provisioned the VNet. Whether you need to delete it depends on whether it existed before you started this series.
If NetworkWatcherRG existed before you started, you can leave it alone. It belongs to something else.
If it was created during this project, delete it now using the same process as above: open the resource group, click Delete resource group, type NetworkWatcherRG to confirm, and delete.
A clean subscription, no lingering costs, and a complete end-to-end Azure project under your belt.
Over this series, you provisioned a full Azure environment from scratch, secured a virtual network with subnets and NSGs, managed a virtual machine and storage account, applied tags for visibility, protected critical resources with locks, and cleaned everything up properly. That is the full lifecycle of Azure resource management.
Kindly share and leave your comments.



Top comments (0)