Microsoft Azure Administrator (AZ-104) · Section 3 · 23% of the exam
Modify an existing Azure Resource Manager template
One of the objectives of the Microsoft Azure Administrator (AZ-104) exam, in the section “Deploy and manage Azure compute resources”. Here is what it covers, the points to remember and a question to try.
What it covers
An ARM template is a JSON document, and a Bicep file is a cleaner language that compiles to that same JSON. This lesson shows how to read every section of both, how dependencies and parameters work, and how to change an existing template safely before you deploy it again.
Points to remember
- ARM templates are JSON with parameters, variables, resources and outputs sections; Bicep compiles to the same JSON.
- A resource is identified by
type(provider/type),apiVersion,nameandlocation; the apiVersion selects the available properties. - In Bicep the symbolic name (
stg) is local to the file;stg.idorparent: stgcreates an implicit dependency. dependsOnis explicit ordering in ARM JSON;reference()andlist*()also create dependencies,resourceId()does not.- Use
securestring(ARM) or@secure()(Bicep) for secrets so values are not logged.
Try a question
A storage account was deployed from a template that sets tags. A teammate removes the tags property from the template and redeploys to the same resource group in incremental mode. What happens to the tags on the existing account?
- AThey are kept unchanged, because incremental mode only adds properties and never removes them
- BThe deployment fails because tags cannot be removed
- CThey are merged with the tags in the resource group
- DThey are removed, because omitted properties return to their defaults
Show the answer
D. A common misunderstanding is that unspecified properties are left alone. Resource Manager treats the definition in the template as the final state of that resource, so properties you leave out are reset to their defaults. Always include every non-default value in the template.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Reading and modifying ARM templates and Bicep files teaches this objective (about 40 minutes), and 11 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Interpret an Azure Resource Manager template or a Bicep file
- Modify an existing Bicep file
- Deploy resources by using an Azure Resource Manager template or a Bicep file
- Export a deployment as an Azure Resource Manager template or convert an Azure Resource Manager template to a Bicep file
- Create a virtual machine
- Configure Azure Disk Encryption
- Move a virtual machine to another resource group, subscription, or region
- Manage virtual machine sizes
- Manage virtual machine disks
- Deploy virtual machines to availability zones and availability sets
- Deploy and configure an Azure Virtual Machine Scale Sets
- Create and manage an Azure container registry