nerdexam
MicrosoftMicrosoft

AZ-400 · Question #122

AZ-400 Question #122: Real Exam Question with Answer & Explanation

Azure ARM Template Deployment — Explanation Overall Goal This task tests your ability to modify an Azure Resource Manager (ARM) template to configure a Virtual Network (VNet) with specific IP address constraints, then deploy it via the portal. The core skill is understanding CI

Submitted by skyler.x· Mar 6, 2026Design and implement build and release pipelines

Question

SIMULATION You plan to deploy a template named D:\Deploy.json to a resource group named Deploy- lod9940427. You need to modify the template to meet the following requirements, and then to deploy the template: - The address space must be reduced to support only 256 total IP addresses. - The subnet address space must be reduced to support only 64 total IP addresses. To complete this task, sign in to the Microsoft Azure portal. Answer: 1. Sign in to the portal, 2. Choose template Deploy-lod9940427 3. Select Edit template, and then paste your JSON template code into the code window. 4. Change the ASddressPrefixes to 10.0.0.0/24 in order to support only 256 total IP addresses. addressSpace":{"addressPrefixes": ["10.0.0.0/24"]}, 5. Change the firstSubnet addressprefix to 10.0.0.0/26 to support only 64 total IP addresses. "subnets":[ { "name":"firstSubnet", "properties":{ "addressPrefix":"10.0.0.0/24" } 6. Select Save. 7. Select Edit parameters, provide values for the parameters that are shown, and then select OK. 8 Select Subscription. Choose the subscription you want to use, and then select OK. 9. Select Resource group. Choose an existing resource group or create a new one, and then select OK. 10. Select Create. A new tile on the dashboard tracks the progress of your template deployment. References: https://docs.microsoft.com/en-us/azure-stack/user/azure-stack-deploy-template-portal?view=azs- 1908 https://docs.microsoft.com/en-us/azure/architecture/building-blocks/extending-templates/update- resource

Options

  • taskModify the 'D:\Deploy.json' template to reduce the address space to support 256 total IP addresses and the subnet address space to support 64 total IP addresses, then deploy the template to the 'Deploy-lod9940427' resource group.
  • prerequisitesMicrosoft Azure portal access

Explanation

Azure ARM Template Deployment — Explanation

Overall Goal

This task tests your ability to modify an Azure Resource Manager (ARM) template to configure a Virtual Network (VNet) with specific IP address constraints, then deploy it via the portal. The core skill is understanding CIDR notation and how ARM templates define network resources declaratively.


CIDR Notation Primer (Critical Context)

CIDR (Classless Inter-Domain Routing) notation x.x.x.x/n where /n is the prefix length:

CIDRHostsFormula
/242562^(32-24) = 256
/26642^(32-26) = 64

This is why /24 satisfies "256 addresses" and /26 satisfies "64 addresses." The subnet must fit inside the VNet's address space — /26 fits inside /24.


Step-by-Step Reasoning

Step 1 — Sign in to the portal Required for authentication/authorization. Without this, you cannot access any Azure resources or templates.

Step 2 — Choose template Deploy-lod9940427 The template is pre-staged in the resource group. You're not creating a new one; you're modifying the existing deployment template. Skipping to step 3 without finding the right template means you'd edit the wrong resource.

Step 3 — Select Edit template ARM templates are JSON files. The portal provides an inline editor so you can modify the template before deployment. This is where the actual configuration change happens. Deploying without editing first would use the original (wrong) address space.

Step 4 — Change addressPrefixes to 10.0.0.0/24

"addressSpace": {
  "addressPrefixes": ["10.0.0.0/24"]
}

This defines the VNet's total address space — 256 IPs. The original template likely used a larger block (e.g., /16 = 65,536 IPs). Using /23 or larger would violate the "only 256" requirement. Using /25 would give only 128 — too few.

Step 5 — Change firstSubnet addressPrefix to 10.0.0.0/26

"subnets": [{
  "name": "firstSubnet",
  "properties": {
    "addressPrefix": "10.0.0.0/26"
  }
}]

This carves out a subnet within the VNet. The subnet must be a subset of the VNet space — 10.0.0.0/26 is entirely within 10.0.0.0/24. If you used /25 (128 addresses) instead, it exceeds the requirement. If you accidentally used /24 here (matching the VNet), Azure would allow it but you'd have no room for other subnets.

Note: The answer key in your question has a typo — step 5 description says /26 but the JSON snippet incorrectly shows /24. The correct value is /26.

Step 6 — Save Commits your JSON edits to the template. If skipped, your changes are lost and the original (unmodified) template deploys.

Step 7 — Edit parameters ARM templates use parameters to accept runtime values (e.g., VNet name, location). These must be filled before deployment. Skipping causes deployment failure due to missing required inputs.

Step 8 — Select Subscription Azure resources must be billed to a subscription. Every deployment requires one. Missing this means Azure doesn't know where to charge or enforce quota limits.

Step 9 — Select Resource group Resource groups are logical containers for Azure resources. The task specifies Deploy-lod9940427. Choosing the wrong group deploys to the wrong environment.

Step 10 — Select Create Triggers the actual deployment. Azure validates the template, provisions the VNet/subnet, and shows progress on the dashboard tile.


What Breaks If Steps Are Out of Order

  • Skipping Step 4/5 before Save: Template deploys with original CIDR values — fails the requirements.
  • Deploying before setting parameters (Step 7): Deployment fails or prompts you mid-deploy.
  • Wrong resource group (Step 9): Resources land in the wrong scope, and the grader won't find them.

Memory Tip

"SAVE before you SUBSCRIBE" — Edit → Save → Parameters → Subscription → Resource Group → Create. Think of it as filling out a form top-to-bottom: what (template) → how (params) → who pays (subscription) → where (resource group) → go (create).

For CIDR: /24 = 256, /26 = 64 — each step up in prefix by 2 quarters the address count.

Topics

#ARM Templates#Azure Networking#Virtual Network#Template Deployment

Community Discussion

No community discussion yet for this question.

Full AZ-400 PracticeBrowse All AZ-400 Questions