A resource group named RG-App contains a virtual network, a storage account and a virtual machine. An administrator runs 'az deployment group create' against RG-App with '--mode Complete' and a template that defines only the virtual network. What happens to the storage account and the virtual machine?
Choose one.
Deployment mode decides what Resource Manager does with resources that exist in the target resource group but are not in the template. Incremental (the default) leaves them alone; Complete deletes them so the group matches the template.
With '--mode Complete', the storage account and VM are absent from the template, so Resource Manager deletes them after deploying the virtual network. Nothing protects a resource because it contains data; only a resource lock on the group or resource stops Complete-mode deletion. Microsoft now recommends deployment stacks rather than Complete mode when deletions are intended, and what-if before any Complete-mode run.
- Identify the mode: Complete was set explicitly.
- List the resources in the group that the template does not declare: the storage account and the VM.
- Apply the Complete-mode rule: undeclared resources in the target group are deleted.
- Remember that a resource lock, not the resource type, is what would prevent the deletion.
Exam tip: Complete mode deletes whatever the template leaves out; run what-if first, or use deployment stacks.
ARM Templates and Bicep: AZ-104 Deployment Guide — the lesson that teaches this.