AZ-204 Develop Azure compute solutions Practice Question
Exhibit
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Web/sites",
"apiVersion": "2022-09-01",
"name": "myapp",
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', 'myplan')]"
}
}
]
}Refer to the exhibit. You deploy this ARM template to a resource group. The template fails with a 'ResourceNotFound' error. What is the most likely cause?
⚠ Common exam trap
Microsoft often tests the distinction between a missing resource and a missing dependency; the trap here is that candidates assume a 'ResourceNotFound' error always means a missing 'dependsOn' property, when in fact it indicates the referenced resource does not exist at all.
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 App Service plan 'myplan' does not exist in the resource group.
The ARM template references an App Service plan named 'myplan' in the 'serverFarmId' property of the Microsoft.Web/sites resource. If 'myplan' does not exist in the same resource group, the deployment fails with a 'ResourceNotFound' error because Azure Resource Manager cannot resolve the dependency on a non-existent resource. The template does not include a definition for the App Service plan, so it must already exist in the resource group.
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 App Service plan 'myplan' does not exist in the resource group.
Why this is correct
An Azure App Service Web App requires an existing App Service Plan to host it. If the ARM template attempts to deploy a web app and references an App Service Plan by name ('myplan') that is neither defined within the same template nor already present in the target resource group, the deployment will fail. The Azure Resource Manager (ARM) engine will return a `ResourceNotFound` error because it cannot locate the specified parent hosting plan for the web app.
- ✗
The 'apiVersion' is incorrect.
Why it's wrong here
The `apiVersion` specified for Azure App Service resources, such as `2022-03-01`, is a valid and commonly used API version. An incorrect or unsupported `apiVersion` would typically result in a schema validation error or an `InvalidApiVersion` error during template deployment, indicating that the API version itself is not recognized. It would not directly cause a `ResourceNotFound` error for a dependent resource like an App Service Plan.
- ✗
The template is missing the 'dependsOn' property.
Why it's wrong here
The `dependsOn` property is primarily used to establish deployment order between resources *defined within the same ARM template*. While missing `dependsOn` can lead to race conditions and `ResourceNotFound` errors if a child resource attempts to deploy before its parent *within the template*, it is irrelevant for referencing an App Service Plan that is expected to pre-exist or be defined elsewhere. The core issue here is the non-existence of the referenced plan, not the sequencing of resources defined in this specific template.
- ✗
The 'type' property is incorrect for a web app.
Why it's wrong here
The `type` property `Microsoft.Web/sites` is the correct and standard resource type identifier for an Azure App Service Web App. If the `type` property were incorrect, the ARM deployment engine would typically report an `InvalidResourceType` error or a schema validation failure, indicating that the specified resource type is unknown or malformed. This error would be distinct from a `ResourceNotFound` error, which specifically indicates that a referenced resource could not be located.
Visual reference
Go deeper
Related to this question
About these practice questions
This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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-204 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-204 exam.