What the error means
ParentResourceNotFound is an Azure Resource Manager error that you might get when you deploy a resource that depends on a parent resource. It occurs in deployments made with a Bicep file or an Azure Resource Manager template (ARM template). Microsoft documents the message as: Can not perform requested operation on nested resource. Parent resource 'exampleserver' not found.
A child resource needs its parent to exist before the child is created. The name of the child resource defines the connection with the parent, in the format parent-resource-name/child-resource-name. For example, a SQL database is a child of a SQL server, and its name combines the server name and the database name.
Common causes
- The server and the database are deployed in the same template, but no dependency on the server is specified. The database deployment might start before the server has deployed, and then it fails with ParentResourceNotFound.
- The parent already exists and is not deployed in the same template, but Resource Manager cannot associate the child with it because the child resource name is not in the correct format.
- The child resource is deployed to a resource group that is different from the resource group of the parent resource.
How to fix it
1. Check the child name and the resource group
This is a general step: compare the child name with the parent name. It must be in the format parent-resource-name/child-resource-name, and the child must be deployed to the same resource group as the parent. A wrong name or resource group are two of the causes Microsoft lists.
2. Add a dependency when both are in one template
When parent and child are deployed in the same template, use a dependency. In Bicep, one option is to declare the child resource nested inside the parent. The child then gets the resource type and API version from the parent, and that creates the dependency. In an ARM template, use dependsOn on the child:
"dependsOn": [
"[variables('sqlServerName')]"
]3. Reference the existing parent when it was deployed elsewhere
When the parent was deployed in a different template, do not set a dependency. Deploy the child to the same resource group and provide the name of the parent resource. In Bicep, Microsoft uses the existing keyword to reference the parent, and the child uses the parent property with the parent's symbolic name:
resource sqlServer 'Microsoft.Sql/servers@2022-02-01-preview' existing = {
name: sqlServerName
}In an ARM template, the name element combines the parent and child names.
If nothing works
Confirm that the parent resource really exists in the resource group you deploy to, and compare names character by character. For related lookup failures, see the ResourceNotFound page.
What we checked
One official Microsoft Learn page was read on 2026-11-25: the article on resolving errors for parent resources. It gives the error message, the three causes and the two solutions for Bicep and ARM templates. The error was not reproduced for this page.
Last checked: 2026-11-25.