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 createor 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
.bicepparamfile (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?
- Aaz deployment sub create --template-file main.bicep
- Baz deployment group create --resource-group rg-app --template-file main.bicep
- Caz group export --name rg-app --include-parameter-default-value --template-file main.bicep
- 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
- Interpret an Azure Resource Manager template or a Bicep file
- Modify an existing Azure Resource Manager template
- Modify an existing 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