AZ-104 Deploy and Manage Azure Compute Practice Question
An operations team must deploy 20 identical application VMs every sprint from source control and wants the deployment definition to be readable and repeatable. Which approach should they use?
⚠ Common exam trap
Test-takers frequently confuse Azure Policy with a deployment tool, but Azure Policy only audits or enforces rules (e.g., requiring a specific tag) and cannot provision resources like VMs, whereas Bicep is designed specifically for declarative infrastructure deployment.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use a Bicep template stored in source control
B is correct because Bicep is a domain-specific language (DSL) for deploying Azure resources declaratively. Storing a Bicep template in source control ensures the deployment definition is readable (using concise syntax) and repeatable (via idempotent deployments), meeting the team's requirement for 20 identical VMs every sprint.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Manually create each VM in the Azure portal
Why it's wrong here
Manually creating each VM through the portal is time-consuming and error-prone, and it produces no auditable record of the exact configuration used—leading to configuration drift and making it difficult to reproduce or roll back changes. Manual processes also scale poorly across 20 VMs and are not idempotent: repeating the steps may yield different results due to human error or evolving defaults. Infrastructure-as-code eliminates these issues by making the deployment source-controlled and repeatable.
When this WOULD be correct
This option would be correct if the question asked for a one-time deployment of a single VM for testing purposes, where the team needs to quickly evaluate portal features without automation requirements.
- ✓
Use a Bicep template stored in source control
Why this is correct
A Bicep template is a declarative infrastructure-as-code file that defines the full VM topology—including NICs, disks, and network settings—in a repeatable, idempotent way. Storing it in source control enables versioned change history, pull-request review, and automated deployment via CI/CD, ensuring all 20 VMs are provisioned identically and can be redeployed consistently. This approach also minimizes configuration drift compared to manual portal steps.
- ✗
Capture a screenshot of the portal settings for future reference
Why it's wrong here
A screenshot captures static visual information, such as a portal blade's fields, but it lacks any machine-readable structure or execution logic needed to recreate the infrastructure. It cannot be parsed by Azure to deploy resources, and any manual re-entry from a screenshot is prone to error and inconsistency. Documentation is useful but not a repeatable deployment mechanism.
When this WOULD be correct
If the question asked for a method to document manual configuration steps for a one-time deployment where automation is not required, a screenshot could serve as a visual reference for recreating settings.
- ✗
Use Azure Policy to create the VMs automatically
Why it's wrong here
Azure Policy is a governance service that evaluates and enforces compliance rules (e.g., tagging, allowed locations, disk encryption) on resources—it does not have a deployment engine to create VMs or any other infrastructure. While you can use policy to restrict or audit VM settings after creation, it cannot deploy 20 identical VMs automatically. The correct deployment tool is an IaC template like Bicep.
When this WOULD be correct
A question asks: 'You need to ensure that all VMs in a subscription have a specific tag and are located in allowed regions. Which approach should you use?' In that scenario, Azure Policy would be correct to enforce those rules.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓Use a Bicep template stored in source controlCorrect answer▾
Why this is correct
A Bicep template is a declarative infrastructure-as-code file that defines the full VM topology—including NICs, disks, and network settings—in a repeatable, idempotent way. Storing it in source control enables versioned change history, pull-request review, and automated deployment via CI/CD, ensuring all 20 VMs are provisioned identically and can be redeployed consistently. This approach also minimizes configuration drift compared to manual portal steps.
✗Manually create each VM in the Azure portalWrong answer — click to see why▾
Why this is wrong here
Manually creating each VM in the Azure portal is not repeatable or scalable for 20 identical VMs every sprint, and it cannot be stored in source control for versioning and automation.
★ When this WOULD be the correct answer
This option would be correct if the question asked for a one-time deployment of a single VM for testing purposes, where the team needs to quickly evaluate portal features without automation requirements.
Why candidates choose this
Candidates may think manual creation is straightforward and familiar, underestimating the need for repeatability and source control integration in a DevOps scenario.
✗Capture a screenshot of the portal settings for future referenceWrong answer — click to see why▾
Why this is wrong here
Capturing a screenshot of portal settings does not provide a machine-readable, repeatable deployment definition; it lacks automation and version control, making it unsuitable for deploying 20 identical VMs every sprint.
★ When this WOULD be the correct answer
If the question asked for a method to document manual configuration steps for a one-time deployment where automation is not required, a screenshot could serve as a visual reference for recreating settings.
Why candidates choose this
Candidates may think a screenshot is a quick way to document settings without learning infrastructure-as-code tools, underestimating the need for repeatability and automation in DevOps workflows.
✗Use Azure Policy to create the VMs automaticallyWrong answer — click to see why▾
Why this is wrong here
Azure Policy is used to enforce compliance rules and audit configurations, not to deploy resources. It cannot create VMs automatically; it only evaluates or remediates existing resources.
★ When this WOULD be the correct answer
A question asks: 'You need to ensure that all VMs in a subscription have a specific tag and are located in allowed regions. Which approach should you use?' In that scenario, Azure Policy would be correct to enforce those rules.
Why candidates choose this
Candidates may think Azure Policy can automate deployment because it can apply configurations automatically, but it lacks the capability to provision new resources like VMs.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Go deeper
Related to this question
About these practice questions
One of 1,049 original AZ-104 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.