Courseiva
Question 376 of 1,049
Deploy and Manage Azure ComputeeasyMultiple ChoiceObjective-mapped

AZ-104 Deploy and Manage Azure Compute Practice Question

Exhibit

Repository plan:
- The operations team deploys the same VM and networking layout every sprint
- Changes must be easy to review in pull requests
- The team wants a declarative Azure deployment file
- Current sample file is lengthy JSON and hard to maintain

Based on the exhibit, the team wants a readable, repeatable deployment definition stored in source control. Which approach should they use for the Azure resources?

⚠ Common exam trap

Many exam-takers confuse governance tools (Azure Policy) or operational scripts (runbooks) with infrastructure-as-code solutions, overlooking that Bicep is the native, declarative language designed specifically for repeatable Azure resource deployments.

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 because it provides a concise declarative syntax for Azure deployments.

Bicep is a domain-specific language (DSL) that provides a concise, declarative syntax for deploying Azure resources. It is designed to be more readable than ARM templates and can be stored in source control, enabling repeatable, version-controlled deployments. This directly meets the team's requirement for a readable, repeatable deployment definition.

Answer analysis

Option-by-option breakdown

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

  • Azure Policy because it enforces the deployment automatically.

    Why it's wrong here

    Azure Policy is a governance service that enforces compliance rules (e.g., allowed regions, required tags) on resources at creation or during evaluation; it does not provision or define any resource itself. A policy definition only contains the rule and effect, with no capacity to describe virtual networks, compute, or storage configurations. It cannot replace an Infrastructure as Code template because it never produces a deployable artifact; instead, it complements deployment by auditing and restricting what can be created.

    When this WOULD be correct

    When the question asks for a mechanism to automatically enforce tagging or location restrictions across all subscriptions, ensuring resources comply with organizational standards without manual intervention.

  • Bicep because it provides a concise declarative syntax for Azure deployments.

    Why this is correct

    Bicep is the best choice because it is a declarative Azure language that is easier to read and maintain than raw ARM JSON. It works well in source control, supports code review, and is commonly used to define repeatable infrastructure deployments.

  • A runbook in Azure Automation because it is always easier to read than templates.

    Why it's wrong here

    Runbooks are procedural automation scripts (PowerShell or Python) executed by Azure Automation for operational tasks such as patching or incident response. They do not declare an end-state infrastructure topology, so they lack the idempotent reconciliation and built-in dependency validation that Bicep provides. For repeatable deployments, a runbook would require custom error handling and state management, making it less readable and maintainable than a declarative template.

    When this WOULD be correct

    When the question asks for automating a recurring operational task, such as starting/stopping VMs on a schedule or responding to alerts, and the solution must be scripted in PowerShell or Python.

  • A resource lock because it prevents unauthorized changes to the deployment.

    Why it's wrong here

    Resource locks are administrative safeguards applied to existing resources to prevent deletion or modification (using the ReadOnly or CanNotDelete scopes), but they contain zero information about how a resource should be configured or deployed. You cannot create a virtual machine or App Service by applying a lock; it only protects a resource that already exists. Locks are typically added to a deployed environment as a final guardrail, making them an operational control rather than a repeatable definition mechanism.

    When this WOULD be correct

    When the question asks for a mechanism to prevent accidental deletion or modification of critical Azure resources, such as production databases or key vaults, a resource lock (e.g., CanNotDelete or ReadOnly) would be 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 because it provides a concise declarative syntax for Azure deployments.Correct answer

Why this is correct

Bicep is the best choice because it is a declarative Azure language that is easier to read and maintain than raw ARM JSON. It works well in source control, supports code review, and is commonly used to define repeatable infrastructure deployments.

Azure Policy because it enforces the deployment automatically.Wrong answer — click to see why

Why this is wrong here

Azure Policy enforces compliance rules on existing resources, but it does not provide a readable, repeatable deployment definition stored in source control; it's for governance, not infrastructure-as-code deployment.

★ When this WOULD be the correct answer

When the question asks for a mechanism to automatically enforce tagging or location restrictions across all subscriptions, ensuring resources comply with organizational standards without manual intervention.

Why candidates choose this

Candidates may confuse policy enforcement with deployment automation, thinking that 'enforces deployment automatically' means it defines and deploys resources, rather than just auditing or preventing non-compliant changes.

A runbook in Azure Automation because it is always easier to read than templates.Wrong answer — click to see why

Why this is wrong here

Runbooks are for automating operational tasks and workflows, not for defining infrastructure deployments in a declarative, repeatable manner stored in source control.

★ When this WOULD be the correct answer

When the question asks for automating a recurring operational task, such as starting/stopping VMs on a schedule or responding to alerts, and the solution must be scripted in PowerShell or Python.

Why candidates choose this

Candidates may think runbooks are 'easier to read' because they use familiar scripting languages, overlooking that Bicep is purpose-built for declarative infrastructure as code.

A resource lock because it prevents unauthorized changes to the deployment.Wrong answer — click to see why

Why this is wrong here

A resource lock prevents deletion or modification of resources but does not provide a readable, repeatable deployment definition stored in source control.

★ When this WOULD be the correct answer

When the question asks for a mechanism to prevent accidental deletion or modification of critical Azure resources, such as production databases or key vaults, a resource lock (e.g., CanNotDelete or ReadOnly) would be the correct answer.

Why candidates choose this

Candidates may confuse resource locks with deployment governance, thinking that locking resources ensures deployment consistency, but locks only protect existing resources from changes, not define 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?”

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

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.