0
0
Azurecloud~20 mins

ARM template parameters and variables in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
ARM Template Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding ARM Template Parameters

In an ARM template, what is the main purpose of parameters?

ATo define the output values after deployment
BTo store fixed values that never change in the template
CTo execute scripts during deployment
DTo define values that can be provided during deployment to customize resources
Attempts:
2 left
💡 Hint

Think about what you want to change each time you deploy the template.

Configuration
intermediate
2:00remaining
Variable Usage in ARM Templates

Which option correctly defines a variable named storageAccountName that concatenates 'stor' with a parameter uniqueString?

A"variables": { "storageAccountName": "[concat('stor', parameters('uniqueString'))]" }
B"variables": { "storageAccountName": "[concat('stor', uniqueString)]" }
C"variables": { "storageAccountName": "[concat('stor', parameters['uniqueString'])]" }
D"variables": { "storageAccountName": "[concat('stor', parameters.uniqueString)]" }
Attempts:
2 left
💡 Hint

Remember the correct syntax to reference parameters inside variables uses parameters('name') or parameters['name'].

Architecture
advanced
2:00remaining
Parameter and Variable Scope in Nested ARM Templates

You have a main ARM template that calls a nested template. Which statement is true about passing parameters and using variables in the nested template?

AParameters must be explicitly passed from the main template to the nested template; variables are local to each template.
BVariables defined in the main template are automatically available in the nested template.
CParameters and variables are shared globally across all nested templates without passing.
DVariables can be passed to nested templates but parameters cannot.
Attempts:
2 left
💡 Hint

Think about how data flows between templates during deployment.

security
advanced
2:00remaining
Secure Parameter Usage in ARM Templates

Which parameter type should you use in an ARM template to securely accept a password without exposing it in deployment logs?

A"type": "string"
B"type": "secureString"
C"type": "password"
D"type": "secureObject"
Attempts:
2 left
💡 Hint

Consider how ARM templates handle sensitive data.

service_behavior
expert
2:00remaining
Output Value Behavior with Variables in ARM Templates

Given this ARM template snippet, what will be the value of the output finalName after deployment?

{
  "parameters": {
    "prefix": { "type": "string", "defaultValue": "app" }
  },
  "variables": {
    "name": "[concat(parameters('prefix'), 'svc')]"
  },
  "outputs": {
    "finalName": {
      "type": "string",
      "value": "[variables('name')]"
    }
  }
}
Aappsvc
B${parameters('prefix')}svc
C[parameters('prefix')]svc
Dsvc
Attempts:
2 left
💡 Hint

Variables can use functions to combine parameter values.