AZ-400 Practice Question: Design and implement build and release pipelines
Exhibit
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountName": {
"type": "string",
"defaultValue": "[uniqueString(resourceGroup().id)]"
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
}
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2022-09-01",
"name": "[parameters('storageAccountName')]",
"location": "[parameters('location')]",
"kind": "StorageV2",
"sku": {
"name": "Standard_LRS"
}
}
]
}Refer to the exhibit. You deploy this ARM template using Azure Pipelines. The deployment succeeds, but the storage account is created with a name that is not what you expected. What is the most likely reason?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The uniqueString function returns a hash based on the resource group ID, resulting in a non-meaningful name.
The uniqueString(resourceGroup().id) function generates a deterministic hash based on the resource group ID, resulting in a storage account name that is a hash rather than a human-readable name. Option B is incorrect because the parameter type 'string' can accept a default value that is a string, even if it looks like an object. Option C is incorrect because resourceGroup().location is a valid function that returns the location of the resource group. Option D is incorrect because the apiVersion '2022-09-01' is valid and does not cause naming conflicts; naming conflicts arise from the hash function, not the API version.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The uniqueString function returns a hash based on the resource group ID, resulting in a non-meaningful name.
Why this is correct
The uniqueString function in ARM templates computes a deterministic hash from the supplied inputs, such as the resource group ID, which makes the resulting name technically unique but not human-readable or descriptive. For storage accounts, which require globally unique names, this often leads to seemingly random strings that fail to convey the resource's purpose unless combined with a meaningful prefix.
- ✗
The storage account name parameter is of type 'string' but the default value is an object.
Why it's wrong here
This is incorrect because the parameter is declared with type 'string' and its default value is an ARM expression that evaluates to a string, not an object. The expression, typically concatenating a prefix with uniqueString, is resolved at deployment time to produce a plain string value.
- ✗
The location parameter uses resourceGroup().location which is not a valid function.
Why it's wrong here
This is false because resourceGroup().location is a fully valid ARM template function that retrieves the location of the current resource group. Using it as a parameter default is a common pattern and does not cause any validation or deployment errors.
- ✗
The apiVersion '2022-09-01' is too new and causes a naming conflict.
Why it's wrong here
The API version in an ARM template specifies the schema version for a resource provider's API and does not influence naming rules or conflicts. A newer API version may offer different properties or behavior, but it has no effect on how storage account names are generated or validated.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Azure Pipelines
Azure Pipelines is a cloud-based CI/CD service from Microsoft that automatically builds, tests, and deploys code to any platform or cloud.
Key term
ARM template
An ARM template is a JSON file that defines the infrastructure and configuration for Azure resources, enabling repeatable and consistent deployments.
About these practice questions
One of 823 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.