AZ-104 Practice Question 15: ARM Complete Deployment Mode
Microsoft Azure Administrator Associate (AZ-104) · Test 2 · question 5 of 10
A pipeline deploys an ARM template that defines a virtual network and a network security group into the existing resource group RG-Shared. After last night's run, the storage account stlogs01, which had lived in RG-Shared for a year and is not mentioned anywhere in the template, no longer exists. Nobody ran a delete operation.
What happened, and what should the team change?
Show answer and explanation
Answer:
Deployment mode decides how Resource Manager treats resources in the group that the template does not declare. "In complete mode, Resource Manager deletes resources that exist in the resource group but aren't specified in the template." That is the only mechanism that would silently remove stlogs01 during a deployment. Incremental, which "leaves unchanged resources that exist in the resource group but aren't specified in the template" is both the default and the recommended mode, and Microsoft advises running the what-if operation before any complete-mode deployment.
Option A misstates incremental mode. It never deletes or resets resources that are absent from the template; it only reapplies all properties of resources the template *does* declare, which is a different trap.
Option C describes something Azure does not do. Resource locks have no expiry, and a CanNotDelete lock would have *prevented* this deletion; complete mode does not delete resources in a locked resource group.
Option D contradicts two rules: linked and nested templates must use incremental mode, and in a multi-resource-group deployment only the resource group named in the deployment operation is eligible for complete-mode deletion. Re-running a template also does not restore a deleted storage account.
Reference: Azure Resource Manager deployment modes