{ "query": "When you deploy an ARM template to a resource group in Complete mode what happens to resources in that resource group that are not declared in the template?", "options": [ { "text": "Resources not included in the template are left unchanged", "explanation": "This describes Incremental mode where existing resources remain if they are not in the template.", "correct": false, "selected": false }, { "text": "ARM deletes resources in the resource group that are not declared in the template", "explanation": "Complete mode removes undeclared resources so the resource group matches the template exactly.", "correct": true, "selected": false }, { "text": "Only resources tagged for deletion are removed and others are preserved", "explanation": "This incorrectly claims tag based deletion controls deployment cleanup which is not accurate.", "correct": false, "selected": false } ], "answer": "
The correct answer is ARM deletes resources in the resource group that are not declared in the template.
When you deploy an ARM template in Complete mode the deployment treats the template as the full desired state for the resource group and it removes existing resources that are not defined in the template. This ensures the resource group contains only the resources declared in the template unless protections such as resource locks or policies prevent deletion.
Resources not included in the template are left unchanged is incorrect because that behavior describes Incremental mode. In Incremental mode ARM preserves existing resources that are not in the template and it only adds or updates resources that are declared.
Only resources tagged for deletion are removed and others are preserved is incorrect because ARM does not rely on a special deletion tag for Complete deployments. Complete mode deletes any resource not present in the template regardless of tags unless an external protection prevents the deletion.
", "batch_id": "633", "answerCode": "2", "type": "multiple-choice", "originalQuery": "Let's examine the following situation:. The resource group includes: · Virtual Machine A · Storage account B · Virtual network C You are trying to deploy the below resource using the ARM template : · Network security group D Below is the PowerShell cmdlet you are using to deploy the template. New-AzResourceGroupDeployment -Mode Complete -Name ExampleDeployment ` -ResourceGroupName ExampleResourceGroup ` -TemplateFile c:\\MyTemplates\\storage.json As you can see in the above cmdlet, we are using mode as complete. When deploying resources with Azure Resource Manager templates (ARM templates), you have two options for deployment mode: incremental or complete. What will happen if we use mode as complete?", "originalOptions": "A. Resource Manager deletes resources in the resource group that aren't specified in the template. – that means virtual machine A, Storage account B, Virtual Network C will be deleted since these are not defined in ARM template.When a question mentions deployment modes remember that Complete enforces the template as the desired state and removes undeclared resources while Incremental preserves them.
", "references": [ "https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-modes?tabs=azure-powershell", "https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/overview" ], "video_url": "https://certificationation.com/videos/azure/az-104-admin-associate/azure-the-resource-group-includes-exam-277.html", "url": "https://certificationation.com/questions/azure/az-104-admin-associate/azure-the-resource-group-includes-exam-277.html" }