Using management locks
Of course, there is a technical feature that prevents you from accidentally deleting anything on Azure – a feature called management locks. There are two different types of locks in Azure:
- Delete locks ensure that no one can delete resources from your Azure subscription, by accident or on purpose. Authorized users can still read and modify a resource, but they can no longer delete it.
- ReadOnly locks make sure that only authorized users can read a resource, but also that they cannot modify it nor delete it.
In every subscription I create, I usually use a core resource group to which I deploy resources that are used across several other resource groups. For example, if I have a virtual network that is used by several services across the entire subscription, or an Azure key vault in which I store administrative credentials as secrets, then these types of resources are created in one of my core resource groups. As you can imagine, the resources...