CertLumen

Microsoft Azure Administrator (AZ-104) · Section 3 · 23% of the exam

Modify an existing Bicep file

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

You create a Bicep parameters file that supplies values for main.bicep. Which statement must the .bicepparam file begin with so that it is linked to the Bicep file?

  1. Aimport './main.bicep'
  2. BtargetScope = './main.bicep'
  3. Cusing './main.bicep'
  4. Dmodule main './main.bicep'
Show the answer

C. A .bicepparam file starts with using './main.bicep' and then assigns each value with param name = value. Because of the using line, you pass only the parameters file to the Azure CLI (--parameters main.bicepparam) and omit --template-file.

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 →