Question 11 — AZ-104 Case Study Set
Review the ARM template fragment used by Paideffort.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "2.1.0.0",
"parameters": {
"environmentName": {
"type": "string",
"allowedValues": [ "dev", "prod" ]
},
"location": {
"type": "string"
}
},
"variables": {
"storageName": "[concat('paideffort', parameters('environmentName'), uniqueString(resourceGroup().id))]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2025-01-01",
"name": "[variables('storageName')]",
"location": "westus",
"sku": {
"name": "[parameters('storageSku')]"
},
"kind": "StorageV2",
"properties": {
"supportsHttpsTrafficOnly": true
}
}
],
"outputs": {
"storageAccountName": {
"type": "string",
"value": "[variables('storageName')]"
}
}
}
Which two changes are required to align this template with Paideffort's deployment requirements and allow the referenced configuration to resolve correctly? (Select two answers)
Replace the hard-coded
westusresource location with an expression that uses thelocationparameter.Define a
storageSkuparameter or otherwise replace its unresolved parameter reference with a valid value source.Move
storageNamefrom variables to outputs because ARM resources cannot use variables for resource names.Remove
environmentNamebecause parameter values cannot participate in template expressions used for resource names.
Correct answers
Replace the hard-coded
westusresource location with an expression that uses thelocationparameter.Define a
storageSkuparameter or otherwise replace its unresolved parameter reference with a valid value source.
Explanations
Correct Answer:
Replace the hard-coded westus resource location with an expression that uses the location parameter.
Define a storageSku parameter or otherwise replace its unresolved parameter reference with a valid value source.
Explanation:
Paideffort requires the deployment-supplied region to control regional placement, but the storage account is fixed to westus. In addition, the resource references storageSku, although no parameter with that name is defined. Correcting both conditions makes the resource consistent with the deployment model and resolves the SKU expression.
Wrong Answers:
Move storageName from variables to outputs because ARM resources cannot use variables for resource names.
ARM resources can reference variables. Paideffort appropriately uses a variable to centralize the storage-name expression.
Remove environmentName because parameter values cannot participate in template expressions used for resource names.
Parameters can be referenced in ARM expressions. Paideffort uses environmentName to produce an environment-aware storage name.