title | description | services | documentationcenter | author | manager | editor | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure parent resource errors | Microsoft Docs |
Describes how to resolve errors when working with a parent resource. |
azure-resource-manager,azure-portal |
tfitzmac |
timlt |
azure-resource-manager |
multiple |
na |
na |
support-article |
09/13/2017 |
tomfitz |
This article describes the errors you may encounter when deploying a resource that is dependent on a parent resource.
When deploying a resource that is a child to another resource, you may receive the following error:
Code=ParentResourceNotFound;
Message=Can not perform requested operation on nested resource. Parent resource 'exampleserver' not found."
When one resource is a child to another resource, the parent resource must exist before creating the child resource. The name of the child resource includes the parent name. For example, a SQL Database might be defined as:
{
"type": "Microsoft.Sql/servers/databases",
"name": "[concat(variables('databaseServerName'), '/', parameters('databaseName'))]",
...
But, if you do not specify a dependency on the server, the database deployment might start before the server has deployed.
To resolve this error, include a dependency.
"dependsOn": [
"[variables('databaseServerName')]"
]
For more information, see Define the order for deploying resources in Azure Resource Manager templates.