CertLumen

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, name and location; the apiVersion selects the available properties.
  • In Bicep the symbolic name (stg) is local to the file; stg.id or parent: stg creates an implicit dependency.
  • dependsOn is explicit ordering in ARM JSON; reference() and list*() 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?

  1. AThey are kept unchanged, because incremental mode only adds properties and never removes them
  2. BThe deployment fails because tags cannot be removed
  3. CThey are merged with the tags in the resource group
  4. 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

← Previous objective · All 81 objectives · Next objective →