SaveMyCert
Log in
5 of 5 free questions left today·for 10 a day
AZ-104 · Domain 3

Deploy and manage Azure compute resources practice questions

Deploy and manage Azure compute resources is worth 24% of the AZ-104 exam — the heaviest of the 5 domains. ARM template and Bicep deployments, virtual machines, containers, and Azure App Service. Official weighting 20–25%. 6 fully worked examples are further down this page, answers included.

Exam weight
24%
the heaviest of the 5 domains
Questions
144
across 4 topics
Free, no account
5/day
a free account allows 10 a day
Explanations
Every option
right and wrong

Build a practice session

5 free questions left today.

Domains

How many?

5 free questions left today.

Mode

Ready when you are

10 fresh questions drawn across 1 of 5 domains, in Learn mode.

Review what you missed

Every question you answer incorrectly, and every question you flag while practising, is saved here automatically. Finish a session and you can come back to re-drill just those.

6 sample Deploy and manage Azure compute resources questions, fully explained

Questions from the AZ-104 bank mapped to domain 3, with the answer key and the reasoning behind every option. None of them repeat the examples on the main AZ-104 practice page.

Question 1Deploy and manage Azure compute resources

A resource group named RG-App contains a virtual network, a storage account and a virtual machine. An administrator runs 'az deployment group create' against RG-App with '--mode Complete' and a template that defines only the virtual network. What happens to the storage account and the virtual machine?

Choose one.

  • a
    Both stay in place, and the virtual network is created or updated

    That is Incremental behaviour. Complete mode makes the group match the template, so undeclared resources do not stay.

  • b
    The deployment fails with a conflict and the group is left unchanged

    Resources missing from the template are not a conflict; the deployment succeeds and acts on them according to the mode.

  • c
    The virtual machine is deleted, but the storage account is kept for its data

    Complete mode does not spare a resource because it holds data; any top-level resource absent from the template is deleted.

  • d
    The virtual network is created or updated, and both are then deleted Correct

    Correct. Complete mode deploys the template and then deletes resources in the target resource group that the template does not define.

The concept

Deployment mode decides what Resource Manager does with resources that exist in the target resource group but are not in the template. Incremental (the default) leaves them alone; Complete deletes them so the group matches the template.

Why that’s the answer

With '--mode Complete', the storage account and VM are absent from the template, so Resource Manager deletes them after deploying the virtual network. Nothing protects a resource because it contains data; only a resource lock on the group or resource stops Complete-mode deletion. Microsoft now recommends deployment stacks rather than Complete mode when deletions are intended, and what-if before any Complete-mode run.

How to reason it out
  1. Identify the mode: Complete was set explicitly.
  2. List the resources in the group that the template does not declare: the storage account and the VM.
  3. Apply the Complete-mode rule: undeclared resources in the target group are deleted.
  4. Remember that a resource lock, not the resource type, is what would prevent the deletion.

Exam tip: Complete mode deletes whatever the template leaves out; run what-if first, or use deployment stacks.

ARM Templates and Bicep: AZ-104 Deployment Guide — the lesson that teaches this.

Question 2Deploy and manage Azure compute resources

A release pipeline runs 'az deployment group create' with a template that defines an App Service plan and a web app. It does not pass '--mode'. The target resource group also contains a key vault that a colleague created manually. What is the result of the deployment?

Choose one.

  • a
    The key vault is deleted so that the group matches the template

    Deleting undeclared resources is Complete-mode behaviour, which must be requested explicitly.

  • b
    The plan and web app are deployed, and the key vault is left as it is Correct

    Correct. Incremental is the default mode: template resources are created or updated and undeclared resources are untouched.

  • c
    The deployment is rejected until a value for --mode is supplied

    --mode is optional; when it is omitted the deployment runs in Incremental mode.

  • d
    The deployment fails validation because the key vault is undeclared

    A template does not have to describe every resource in the group; undeclared resources are not a validation error.

The concept

Incremental is the default deployment mode for Azure CLI, PowerShell and the portal. It adds or updates the resources in the template and leaves every other resource in the resource group unchanged.

Why that’s the answer

Because no mode was specified, the deployment runs in Incremental mode. The App Service plan and web app are created or updated, and the manually created key vault, which the template does not mention, is left exactly as it is. Deleting it would require Complete mode; the mode flag is optional, and undeclared resources are not a validation error.

How to reason it out
  1. Check whether a mode was specified: it was not, so the default applies.
  2. Recall that the default is Incremental.
  3. Apply Incremental behaviour: deploy what the template declares and ignore everything else in the group.

Exam tip: No --mode means Incremental: nothing outside the template is touched.

ARM Templates and Bicep: AZ-104 Deployment Guide — the lesson that teaches this.

Question 3Deploy and manage Azure compute resources

Before deploying an updated Bicep file to the production resource group rg-prod, an administrator must see exactly which resources would be created, modified or deleted and which properties would change, without changing anything in Azure. Which command should the administrator run?

Choose one.

  • a
    az deployment group validate --resource-group rg-prod --template-file main.bicep

    Validation checks that the template is syntactically correct and would be accepted by Resource Manager; it does not report a per-resource change list.

  • b
    az deployment group what-if --resource-group rg-prod --template-file main.bicep Correct

    Correct. What-if compares the template with the current state of rg-prod and lists the resources to be created, modified or deleted, with property-level changes, without deploying.

  • c
    az group export --name rg-prod --export-format bicep

    Exporting produces a snapshot template of the current group; it shows nothing about what the new file would change unless the administrator diffs files by hand.

  • d
    az bicep lint --file main.bicep

    Linting checks the Bicep file against best-practice rules locally; it never looks at the deployed resources in rg-prod.

The concept

The what-if operation previews a deployment: it compares the template with the current state of the target scope and reports creates, modifies, deletes and property changes, without making any change.

Why that’s the answer

The requirement is a change preview against the live resource group. Only what-if does that. Validate is the tempting near-twin, but it only confirms that the template would be accepted, not what it would change. Export produces the current state without comparing, and lint checks the file in isolation. In PowerShell, the equivalent is New-AzResourceGroupDeployment -WhatIf.

How to reason it out
  1. Translate the requirement: a per-resource change list against the live group, with no changes made.
  2. Rule out tools that look only at the file (lint) or only at the group (export).
  3. Distinguish what-if (what would change) from validate (would it be accepted).

Exam tip: What-if shows what would change; validate only shows whether it would deploy.

ARM Templates and Bicep: AZ-104 Deployment Guide — the lesson that teaches this.

Question 4Deploy and manage Azure compute resources

A single Bicep file, with no modules, declares three new resource groups and a policy assignment that applies to the subscription that will contain them. Which deployment command and targetScope value should the administrator use?

Choose one.

  • a
    az deployment group create, with targetScope set to 'resourceGroup'

    Resource groups are subscription-level resources, so a resource-group-scope deployment cannot declare them, and its policy assignment would apply only to that group.

  • b
    az deployment tenant create, with targetScope set to 'tenant'

    A tenant-scope file cannot declare resource groups directly; it would need a module scoped to a subscription, which the file does not use.

  • c
    az deployment sub create, with targetScope set to 'subscription' Correct

    Correct. At subscription scope a Bicep file can declare resource groups and a policy assignment on that subscription in the same file.

  • d
    az deployment mg create, with targetScope set to 'managementGroup'

    A management-group deployment cannot declare resource groups without a subscription-scoped module, and an assignment there would apply to the whole management group.

The concept

Every Bicep file targets one scope (targetScope: resourceGroup by default, or subscription, managementGroup, tenant), deployed with the matching command (az deployment group/sub/mg/tenant create). The resources a file can declare directly depend on that scope.

Why that’s the answer

Resource groups are children of a subscription, so they can only be declared directly by a subscription-scope deployment; the policy assignment must also apply to the subscription. Subscription scope satisfies both in one file. Resource-group scope cannot create resource groups. Management-group and tenant scopes could reach a subscription only through a scoped module, which the stem rules out, and their assignments would land on the wrong scope.

How to reason it out
  1. Find the highest-level resource the file declares directly: resource groups, which live in a subscription.
  2. Check where the policy assignment must apply: the subscription.
  3. Note the constraint: no modules, so no cross-scope deployment is possible.
  4. Choose subscription scope: targetScope = 'subscription' and az deployment sub create.

Exam tip: Declaring resource groups means deploying at subscription scope (az deployment sub create).

ARM Templates and Bicep: AZ-104 Deployment Guide — the lesson that teaches this.

Question 5Deploy and manage Azure compute resources

In an ARM template, which section defines values that a user supplies at deployment time, such as an environment name or a VM administrator username?

Choose one.

  • a
    variables

    Variables are computed inside the template from expressions and parameters — they cannot be supplied by the person deploying.

  • b
    outputs

    Outputs return values after the deployment finishes, such as a generated hostname — they flow out of the template, not into it.

  • c
    definitions

    definitions declares user-defined data types (languageVersion 2.0 templates); it describes the shape of values, not values supplied at deployment time.

  • d
    parameters Correct

    Parameters are the template's external inputs — their values are provided at deployment time, on the command line or via a parameter file.

The concept

An ARM template separates concerns into sections: parameters (deployment-time inputs), variables (internal computed values), resources (what gets deployed), and outputs (values returned after deployment). Functions like concat and resourceId glue them together.

Why that’s the answer

Values supplied by the deployer — environment names, admin usernames, SKU choices — belong in parameters, the only section whose values come from outside the template at deployment time. Variables are derived internally and cannot be overridden at deploy time. Outputs are return values, the opposite direction. The definitions element declares reusable data types, not the values themselves.

How to reason it out
  1. Declare each input in the parameters section with a type, and add allowed values or defaults where sensible.
  2. Reference the input in resources with the parameters() function (or directly by name in Bicep).
  3. Supply values at deploy time via --parameters on the CLI or a parameter file per environment.

Exam tip: Parameters are deploy-time inputs, variables are internal calculations, outputs are return values.

ARM Templates and Bicep: AZ-104 Deployment Guide — the lesson that teaches this.

Question 6Deploy and manage Azure compute resources

A company deploys the same Bicep file to dev, test, and production environments. Each environment needs different VM sizes, instance counts, and name prefixes. Which approach requires the LEAST administrative effort while keeping one template?

Choose one.

  • a
    Maintain three copies of the Bicep file, one edited for each environment

    Copies inevitably drift apart — every template change must be applied three times, which multiplies effort and risk instead of reducing it.

  • b
    Create one parameter file per environment and pass the matching file at deployment time Correct

    Per-environment parameter files (dev.bicepparam, prod.bicepparam) keep a single template as the source of truth while cleanly capturing each environment's values.

  • c
    Edit the template's default parameter values before each deployment

    Hand-editing the template before every deployment is manual, error-prone, and destroys the audit trail of what each environment received.

  • d
    Hard-code the environment differences into the variables section using nested if() functions

    Burying environment values in conditional variables makes the template hard to read and still requires template edits whenever an environment's values change.

The concept

Parameter files separate a template's logic from its environment-specific values. One template plus one parameter file per environment is the standard multi-environment pattern for ARM and Bicep (.parameters.json or .bicepparam).

Why that’s the answer

Parameter files achieve the goal directly: a single, unchanging template and a small values file per environment, selected at deploy time. Duplicating the template three times creates drift and triple maintenance. Editing defaults before each deployment is manual toil with no repeatability. Hard-coding conditionals in variables couples environment data to template logic and still needs template edits for value changes.

How to reason it out
  1. Declare every environment-varying value (VM size, count, prefix) as a parameter in the single Bicep file.
  2. Create dev.bicepparam, test.bicepparam, and prod.bicepparam, each supplying that environment's values.
  3. Deploy with 'az deployment group create --template-file main.bicep --parameters prod.bicepparam' — the same command pattern for every environment.

Exam tip: One template, one parameter file per environment — never fork the template to vary its values.

ARM Templates and Bicep: AZ-104 Deployment Guide — the lesson that teaches this.

What AZ-104 domain 3 tests, topic by topic

The official exam guide breaks Deploy and manage Azure compute resources into 4 topics. The question bank follows the same split, so a weak topic shows up as a cluster of misses you can go back and read.

Published AZ-104 practice questions per topic in Deploy and manage Azure compute resources
TopicWhat it coversQuestions
Automate deployment of resources by using Azure Resource Manager (ARM) templates or Bicep filesSkills outline section (AZ-104, as of April 17, 2026). Interpreting an ARM template or a Bicep file; modifying an existing ARM template or Bicep file; deploying resources by using an ARM template or a Bicep file; exporting a deployment as an ARM template or converting an ARM template to a Bicep file.36
Create and configure virtual machinesSkills outline section (AZ-104, as of April 17, 2026). Creating a virtual machine; configuring encryption at host; moving a VM to another resource group, subscription, or region; managing VM sizes and disks; deploying VMs to availability zones and availability sets; deploying and configuring Azure Virtual Machine Scale Sets.36
Provision and manage containers in the Azure portalSkills outline section (AZ-104, as of April 17, 2026). Creating and managing an Azure Container Registry; provisioning containers by using Azure Container Instances and Azure Container Apps; managing sizing and scaling for containers, including Container Instances and Container Apps.36
Create and configure Azure App ServiceSkills outline section (AZ-104, as of April 17, 2026). Provisioning an App Service plan and configuring its scaling; creating an App Service; configuring certificates and Transport Layer Security (TLS); mapping an existing custom DNS name; configuring backup, networking settings, and deployment slots for an App Service.36
Total144

Revise Deploy and manage Azure compute resources before you drill it

Other AZ-104 domains

Deploy and manage Azure compute resources: your questions

Deploy and manage Azure compute resources is domain 3 of the AZ-104 exam guide and carries 24% of the scored content — the heaviest of the 5 domains. On a 50-question paper that works out to roughly 12 questions, though Microsoft Azure does not publish an exact per-domain count and individual exam forms vary.

Source

The domain weight and topic list on this page come from the official AZ-104 exam guide.