CertLumen

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

Deploy resources by using an Azure Resource Manager template or a 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

Deployment sends a template to Resource Manager at a chosen scope in incremental or complete mode, and what-if previews the result first. Export saves a template from a resource group or from deployment history, and decompile turns exported JSON into Bicep.

Points to remember

  • Deploy with az deployment group|sub|mg|tenant create or the matching New-Az...Deployment cmdlet; non-group scopes need --location.
  • Incremental mode (default) leaves extra resources alone; complete mode deletes resources not in the file and is not recommended.
  • Run what-if first: change types are Create, Delete, Modify, NoChange, Ignore and Deploy.
  • Pass parameters inline, with a JSON parameters file or with a .bicepparam file (do not add --template-file with a .bicepparam).
  • Export from a resource group gives a snapshot of current state; export from deployment history gives the exact template that was deployed.

Try a question

You must deploy main.bicep, which creates resources inside an existing resource group named rg-app. Which Azure CLI command is correct?

  1. Aaz deployment sub create --template-file main.bicep
  2. Baz deployment group create --resource-group rg-app --template-file main.bicep
  3. Caz group export --name rg-app --include-parameter-default-value --template-file main.bicep
  4. Daz bicep build --file main.bicep --resource-group rg-app --outfile main.json
Show the answer

B. Choose the command by scope: az deployment group create for resource groups, az deployment sub create for subscriptions, az deployment mg create for management groups and az deployment tenant create for tenants. The last three also require --location.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson Deploying, exporting and converting templates teaches this objective (about 45 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 →