microsoft AZ-104: Microsoft Azure Administrator · Practice questions

3. Deploy and manage Azure compute resources Practice Questions

Review 10 sample questions with their correct answers and explanations. Sign up free to continue with the full topic quiz.

Sign up free for the full quiz

Question 1

Which statement about template parameter files is correct?

  1. They must contain secrets in plain text
  2. They supply per-environment values — Correct
  3. They replace the template's resources
  4. They are only used for Bicep modules

Correct answer

They supply per-environment values

Explanation

Parameter files separate values from the template; secrets can reference Key Vault.

Question 2

You deploy a VM with a Linux image and need to run a configuration script at first boot. What should you use?

  1. Azure Advisor recommendations applied after deployment
  2. Boot diagnostics
  3. A resource lock on the VM
  4. cloud-init custom data — Correct

Correct answer

cloud-init custom data

Explanation

Custom data with cloud-init runs configuration at provisioning.

Question 3

A Linux web app runs a custom container image from ACR. What must be configured for App Service to pull the image securely?

  1. A public IP on the registry
  2. A route table
  3. Anonymous pull on the registry with admin user enabled
  4. A managed identity with the AcrPull role on the registry — Correct

Correct answer

A managed identity with the AcrPull role on the registry

Explanation

Managed identity with AcrPull avoids storing registry credentials.

Question 4

A microservice must scale to zero when idle and scale based on HTTP traffic, without managing Kubernetes. What should you use?

  1. Azure Container Instances without any scaling configuration
  2. Azure Container Apps — Correct
  3. Azure Kubernetes Service with manual node pool scaling
  4. Azure Virtual Machines

Correct answer

Azure Container Apps

Explanation

Container Apps supports scale rules including scale to zero.

Question 5

A VM is unresponsive and you suspect a host problem. Which action moves it to a new host?

  1. Add a tag to the VM
  2. Resize to the same size while running
  3. Redeploy the VM — Correct
  4. Apply a ReadOnly lock

Correct answer

Redeploy the VM

Explanation

Redeploy migrates the VM to a new node and restarts it.

Question 6

You must deploy 20 identical VMs repeatedly in different environments with parameters for size and name. What should you use?

  1. A resource lock
  2. A Bicep file or ARM template with parameters — Correct
  3. Azure Service Health
  4. Azure Advisor recommendations exported to CSV and imported each time

Correct answer

A Bicep file or ARM template with parameters

Explanation

Templates enable repeatable deployments.

Question 7

A Bicep deployment must create a resource only in production. Which feature supports this?

  1. A condition with an if expression — Correct
  2. A Deny policy
  3. A resource lock that blocks deployment in non-production subscriptions
  4. A tag named Production

Correct answer

A condition with an if expression

Explanation

Conditional deployment uses if expressions in Bicep.

Question 8

Which deployment slot setting stays with the slot instead of moving during a swap?

  1. All application settings, which always move with the code
  2. The app's container image
  3. The app's code
  4. A setting marked as deployment slot setting (sticky) — Correct

Correct answer

A setting marked as deployment slot setting (sticky)

Explanation

Sticky settings remain with the slot.

Question 9

An App Service app must reach a database in a VNet. What should you configure?

  1. VNet integration for the app — Correct
  2. A private endpoint on the app for outbound traffic to the database
  3. Azure Bastion
  4. A public IP on the database

Correct answer

VNet integration for the app

Explanation

VNet integration enables outbound access to VNet resources; private endpoints are for inbound access.

Question 10

Which DNS record type maps a custom domain such as www.contoso.com to an App Service default host name?

  1. MX
  2. TXT only
  3. CNAME — Correct
  4. SRV

Correct answer

CNAME

Explanation

CNAME maps a subdomain to another host name; TXT records verify ownership.

Ready for the full quiz?

Create a free QuizAnalyst account to practice the complete question set and save your progress.

Sign up free for the full quiz