Question 868 of 981
AZ-900 Describe cloud concepts Practice Question
What does 'infrastructure as code' (IaC) mean in the context of Azure?
⚠ Common exam trap
Test-takers frequently confuse IaC with imperative scripting (Option C) or with running application code on Azure (Option A), but IaC specifically means defining infrastructure in version-controlled, declarative configuration files.
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
✓
Defining Azure resources in configuration files that can be version-controlled and reused
Infrastructure as Code (IaC) in Azure involves defining and managing Azure resources (e.g., virtual networks, VMs, storage accounts) using declarative configuration files such as ARM templates, Bicep, or Terraform. These files can be stored in version control (e.g., Git), enabling repeatable, consistent deployments and rollbacks through automation, rather than manual or imperative steps.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Writing code that runs directly on Azure hardware
Why it's wrong here
Writing code that executes directly on Azure hardware describes application development or possibly a custom runtime, not infrastructure provisioning. Infrastructure as Code (IaC) focuses on declaring the desired state of cloud resources—such as virtual networks, storage accounts, and compute instances—in machine-readable definition files. Even if code runs on a specific hardware SKU, that is a deployment detail unrelated to IaC's core practice of managing infrastructure through declarative configuration.
- ✓
Defining Azure resources in configuration files that can be version-controlled and reused
Why this is correct
Defining Azure resources in configuration files is the essence of Infrastructure as Code: resource definitions are written in declarative languages like Bicep, ARM templates (JSON), or Terraform, capturing the desired state of the environment. These files can be stored in version control (e.g., Git), enabling code review, audit trails, and rollbacks, and they can be reused across environments (dev, test, prod) to produce consistent, repeatable deployments. This approach shifts infrastructure management from imperative manual steps to a codified, reviewable artifact.
- ✗
Using Azure CLI scripts to deploy one resource at a time imperatively
Why it's wrong here
Using Azure CLI scripts to deploy one resource at a time imperatively means executing a sequence of commands (e.g., az vm create, az network vnet create) that specify actions step by step, rather than describing the final configuration. While such scripts can automate deployments, they lack the key IaC properties: idempotency, declarative state management, and version-controlled resource definitions. IaC tools like Bicep or ARM templates submit a complete desired state model, allowing Azure to reconcile resources automatically, whereas CLI scripts require the operator to manually sequence and handle errors.
- ✗
Converting physical server hardware into virtual machines
Why it's wrong here
Converting physical server hardware into virtual machines is a one-time, imperative process called physical-to-virtual (P2V) conversion, often used in legacy datacenter migrations. This operation is fundamentally different from IaC because it does not involve authoring configuration files or declaring a resource's desired state; it simply virtualizes an existing machine. IaC instead treats infrastructure as deployable code, where each deployment is generated from a source-controlled definition rather than from cloning or migrating a running system.
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 →
Last reviewed: Jun 11, 2026
This AZ-900 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-900 exam.
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.
Sign in to join the discussion.