Bird
Raised Fist0
Azurecloud~20 mins

Azure Resource Manager (ARM) concept - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
ARM Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate
2:00remaining
What happens when you deploy an ARM template with a missing required property?

You deploy an ARM template that defines a virtual machine but forget to include the vmSize property. What will Azure Resource Manager do?

Azure
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "type": "Microsoft.Compute/virtualMachines",
      "apiVersion": "2022-03-01",
      "name": "myVM",
      "location": "eastus",
      "properties": {
        "hardwareProfile": {
        },
        "storageProfile": {
          "imageReference": {
            "publisher": "MicrosoftWindowsServer",
            "offer": "WindowsServer",
            "sku": "2019-Datacenter",
            "version": "latest"
          }
        },
        "osProfile": {
          "computerName": "myVM",
          "adminUsername": "adminUser",
          "adminPassword": "Password123!"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/xxx/resourceGroups/myRG/providers/Microsoft.Network/networkInterfaces/myNIC"
            }
          ]
        }
      }
    }
  ]
}
AThe deployment will succeed but the VM will not start until vmSize is manually set later.
BAzure will assign a default vmSize automatically and complete the deployment.
CThe deployment will fail with a validation error indicating the missing vmSize property.
DThe deployment will partially succeed but the VM resource will be in a failed state.
Attempts:
2 left
💡 Hint

Think about how ARM validates templates before creating resources.

❓ Architecture
intermediate
2:00remaining
How does ARM handle resource dependencies during deployment?

You have an ARM template that creates a storage account and a virtual machine that uses that storage account. How does ARM ensure the VM is created only after the storage account is ready?

AARM automatically detects dependencies based on resource types and deployment order in the template.
BYou must explicitly declare dependencies using the <code>dependsOn</code> property in the VM resource.
CARM deploys all resources in parallel without waiting for dependencies.
DARM uses tags on resources to determine deployment order.
Attempts:
2 left
💡 Hint

Consider how you tell ARM about resource order when one resource needs another.

❓ security
advanced
2:00remaining
What is the best practice to secure sensitive data in ARM templates?

You need to deploy a database with a password using an ARM template. Which approach ensures the password is not exposed in the template or logs?

AUse Azure Key Vault references in the ARM template to retrieve the password securely at deployment.
BHardcode the password directly in the ARM template parameters section.
CStore the password in a plain text file and reference it in the template.
DSend the password as a deployment parameter in the Azure portal without encryption.
Attempts:
2 left
💡 Hint

Think about how to keep secrets safe and not visible in templates or logs.

❓ Configuration
advanced
2:00remaining
What is the output of this ARM template deployment command with the --what-if flag?

You run the following Azure CLI command to deploy an ARM template with the --what-if flag:

az deployment group create --resource-group myRG --template-file template.json --what-if

What will be the result?

AThe command shows a preview of changes that would be made without applying them.
BThe command deploys the template and applies all changes immediately.
CThe command validates the template syntax but does not show any changes.
DThe command deletes existing resources before deploying the template.
Attempts:
2 left
💡 Hint

What does the --what-if flag do in Azure CLI deployments?

✅ Best Practice
expert
3:00remaining
Which approach best supports modular and reusable ARM templates for large infrastructure?

You manage a large Azure environment and want to organize your ARM templates for easier maintenance and reuse. Which approach follows best practices?

ACreate one large ARM template with all resources defined inline.
BWrite separate templates for each resource and deploy them independently without coordination.
CUse only Azure portal to create resources and avoid templates.
DSplit resources into multiple smaller templates and use nested or linked templates with parameters.
Attempts:
2 left
💡 Hint

Think about how to keep templates manageable and reusable.

Practice

(1/5)
1. What is the main purpose of Azure Resource Manager (ARM)?
easy
A. To write code for mobile applications
B. To manage and organize cloud resources as a group
C. To monitor network traffic only
D. To create virtual machines manually

Solution

  1. Step 1: Understand ARM's role

    ARM is designed to help manage cloud resources together, not individually.
  2. Step 2: Compare options

    Options B, C, and D describe unrelated tasks, while A correctly describes ARM's purpose.
  3. Final Answer:

    To manage and organize cloud resources as a group -> Option B
  4. Quick Check:

    ARM manages resources as a group = A [OK]
Hint: ARM groups resources for easy management [OK]
Common Mistakes:
  • Thinking ARM is only for virtual machines
  • Confusing ARM with monitoring tools
  • Assuming ARM writes application code
2. Which of the following is the correct way to deploy resources using ARM templates?
easy
A. Using FTP to upload ARM templates
B. Writing scripts in Python only
C. Using Azure Portal or Azure CLI with the ARM template
D. Manually creating resources without templates

Solution

  1. Step 1: Identify deployment methods

    ARM templates are deployed via Azure Portal or Azure CLI commands.
  2. Step 2: Eliminate incorrect options

    Python scripts and FTP are not standard deployment methods for ARM templates; manual creation ignores automation benefits.
  3. Final Answer:

    Using Azure Portal or Azure CLI with the ARM template -> Option C
  4. Quick Check:

    Deploy ARM templates via Portal or CLI = D [OK]
Hint: Deploy ARM templates via Portal or CLI commands [OK]
Common Mistakes:
  • Thinking ARM templates deploy only with scripts
  • Assuming manual creation is deployment
  • Confusing FTP with deployment method
3. Given this ARM template snippet:
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "type": "Microsoft.Storage/storageAccounts",
      "apiVersion": "2021-04-01",
      "name": "mystorageaccount",
      "location": "eastus",
      "sku": { "name": "Standard_LRS" },
      "kind": "StorageV2"
    }
  ]
}

What resource will this template create when deployed?
medium
A. A storage account named mystorageaccount in East US region
B. A virtual machine named mystorageaccount
C. A database named mystorageaccount
D. A network interface named mystorageaccount

Solution

  1. Step 1: Analyze resource type in template

    The resource type is "Microsoft.Storage/storageAccounts", which means a storage account.
  2. Step 2: Check resource properties

    The name is "mystorageaccount" and location is "eastus", confirming the storage account details.
  3. Final Answer:

    A storage account named mystorageaccount in East US region -> Option A
  4. Quick Check:

    Resource type storageAccounts = storage account = A [OK]
Hint: Resource type defines what is created in ARM template [OK]
Common Mistakes:
  • Confusing storage account with virtual machine
  • Ignoring resource type and focusing on name
  • Assuming location affects resource type
4. You try to deploy an ARM template but get an error saying the resource name is invalid. What is the most likely cause?
medium
A. The template schema URL is missing
B. The location is not specified
C. The API version is too old
D. The resource name contains unsupported characters

Solution

  1. Step 1: Understand error message

    An invalid resource name error usually means the name has characters not allowed by Azure naming rules.
  2. Step 2: Review other options

    Missing schema URL or old API version cause different errors; location missing usually triggers a different message.
  3. Final Answer:

    The resource name contains unsupported characters -> Option D
  4. Quick Check:

    Invalid name error = unsupported characters in name = B [OK]
Hint: Check resource name for invalid characters first [OK]
Common Mistakes:
  • Assuming schema URL causes name errors
  • Ignoring naming rules for resources
  • Thinking location omission causes name errors
5. You want to deploy multiple resources together and ensure they are created in the right order using ARM templates. Which feature should you use?
hard
A. Define dependencies between resources using the "dependsOn" property
B. Deploy each resource separately in different templates
C. Use manual deployment steps outside ARM
D. Create resources without specifying order

Solution

  1. Step 1: Identify how ARM manages resource order

    ARM uses the "dependsOn" property to specify which resources must be created first.
  2. Step 2: Evaluate other options

    Deploying separately or manually loses automation benefits; no order risks deployment failures.
  3. Final Answer:

    Define dependencies between resources using the "dependsOn" property -> Option A
  4. Quick Check:

    Use dependsOn to control deployment order = C [OK]
Hint: Use dependsOn to set resource creation order [OK]
Common Mistakes:
  • Deploying resources separately instead of together
  • Ignoring dependsOn and causing deployment errors
  • Relying on manual steps outside ARM
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard