Question 952 of 1,170
Deploy and Manage Azure ComputeeasyMultiple ChoiceObjective-mapped

AZ-104 Deploy and Manage Azure Compute Practice Question

This AZ-104 practice question tests your understanding of deploy and manage azure compute. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Source control folder:
- /infra/main.bicep
- /infra/parameters/prod.bicepparam
- /infra/modules/vm.bicep
Snippet:
resource vm 'Microsoft.Compute/virtualMachines@2023-09-01' = {
  name: vmName
  location: location
}
Goal: Reuse the same definition for every sprint release.

Based on the exhibit, the operations team wants to store the VM deployment definition in source control and deploy the same group of Azure VMs every sprint. The code should be readable and easy to review. What should they use?

Exhibit

Source control folder:
- /infra/main.bicep
- /infra/parameters/prod.bicepparam
- /infra/modules/vm.bicep
Snippet:
resource vm 'Microsoft.Compute/virtualMachines@2023-09-01' = {
  name: vmName
  location: location
}
Goal: Reuse the same definition for every sprint release.

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

Bicep template files stored in source control.

Bicep is a domain-specific language (DSL) for deploying Azure resources that provides a cleaner, more readable syntax compared to ARM JSON templates. Storing Bicep files in source control enables versioning, code review, and repeatable deployments via CI/CD pipelines, which aligns with the requirement to deploy the same VM group every sprint. The declarative nature of Bicep ensures the deployment definition is both human-readable and machine-executable.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Bicep template files stored in source control.

    Why this is correct

    Bicep is a declarative infrastructure-as-code format that is concise, readable, and easy to review in pull requests. It is well suited to repeatable Azure deployments from source control and supports modular design for VM infrastructure. This matches the team’s requirement for a readable, versioned deployment definition.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Manual creation in the Azure portal.

    Why it's wrong here

    Portal-based deployment is not code-based and is harder to review, repeat, and track across sprints.

    When this WOULD be correct

    For a one-time, ad-hoc deployment where the team needs to quickly test a configuration without writing code or setting up automation, manual portal creation is appropriate.

  • A one-time Azure CLI command typed into Cloud Shell.

    Why it's wrong here

    A one-time command may create resources, but it is not the same as a reusable, source-controlled deployment definition.

    When this WOULD be correct

    For a quick, ad-hoc task like creating a single test VM to verify connectivity, where the deployment does not need to be repeated or stored in source control, a one-time Azure CLI command in Cloud Shell is appropriate.

  • A resource lock on the subscription.

    Why it's wrong here

    A resource lock helps protect existing resources, but it does not define or deploy the VM infrastructure.

    When this WOULD be correct

    An exam question asks: 'You need to prevent accidental deletion of a critical production resource group. What should you configure?' In that context, a resource lock (e.g., CanNotDelete) is the correct answer.

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.

Bicep template files stored in source control.Correct answer

Why this is correct

Bicep is a declarative infrastructure-as-code format that is concise, readable, and easy to review in pull requests. It is well suited to repeatable Azure deployments from source control and supports modular design for VM infrastructure. This matches the team’s requirement for a readable, versioned deployment definition.

Manual creation in the Azure portal.Wrong answer — click to see why

Why this is wrong here

Manual creation in the Azure portal does not support storing deployment definitions in source control or enable repeatable deployments every sprint, as it lacks automation and version control.

★ When this WOULD be the correct answer

For a one-time, ad-hoc deployment where the team needs to quickly test a configuration without writing code or setting up automation, manual portal creation is appropriate.

Why candidates choose this

Candidates may be familiar with the portal's visual interface and mistakenly believe it can be scripted or version-controlled, overlooking the requirement for source control and repeatability.

A one-time Azure CLI command typed into Cloud Shell.Wrong answer — click to see why

Why this is wrong here

A one-time Azure CLI command is not repeatable or idempotent; it cannot be version-controlled and reviewed like code, and it does not define the entire deployment in a declarative, readable format for ongoing sprints.

★ When this WOULD be the correct answer

For a quick, ad-hoc task like creating a single test VM to verify connectivity, where the deployment does not need to be repeated or stored in source control, a one-time Azure CLI command in Cloud Shell is appropriate.

Why candidates choose this

Candidates may think Azure CLI is 'infrastructure as code' and assume it can be saved and reused, overlooking that it is imperative, not declarative, and lacks the readability and idempotency needed for source control and sprint-based deployments.

A resource lock on the subscription.Wrong answer — click to see why

Why this is wrong here

A resource lock prevents accidental deletion or modification of resources but does not provide a deployment definition or enable version-controlled, repeatable deployments.

★ When this WOULD be the correct answer

An exam question asks: 'You need to prevent accidental deletion of a critical production resource group. What should you configure?' In that context, a resource lock (e.g., CanNotDelete) is the correct answer.

Why candidates choose this

Candidates may confuse resource locks with deployment governance, thinking that locking resources ensures consistent deployment, but locks only protect existing resources, not define or automate deployments.

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?”

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may confuse a deployment tool (like Bicep or ARM templates) with a management tool (like resource locks) or assume that a one-time CLI command is sufficient for repeatable deployments, overlooking the need for version-controlled, reviewable infrastructure-as-code.

Trap categories for this question

  • Command / output trap

    A one-time command may create resources, but it is not the same as a reusable, source-controlled deployment definition.

Detailed technical explanation

How to think about this question

Bicep files are transpiled into ARM JSON templates before deployment, but they offer modularity via modules and support for loops, conditions, and parameter files, which simplifies complex VM deployments. Under the hood, Bicep uses the same Azure Resource Manager API as ARM templates, ensuring full compatibility. In a real-world scenario, teams often combine Bicep with Azure DevOps or GitHub Actions to automate deployments, where the Bicep file's readability accelerates code reviews and reduces errors in multi-environment rollouts.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-104 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-104 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-104 question test?

Deploy and Manage Azure Compute — This question tests Deploy and Manage Azure Compute — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Bicep template files stored in source control. — Bicep is a domain-specific language (DSL) for deploying Azure resources that provides a cleaner, more readable syntax compared to ARM JSON templates. Storing Bicep files in source control enables versioning, code review, and repeatable deployments via CI/CD pipelines, which aligns with the requirement to deploy the same VM group every sprint. The declarative nature of Bicep ensures the deployment definition is both human-readable and machine-executable.

What should I do if I get this AZ-104 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More AZ-104 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.