Skip to content

Files

Latest commit

8f6c444 · Sep 13, 2017

History

History
55 lines (41 loc) · 1.58 KB

resource-manager-parent-resource-errors.md

File metadata and controls

55 lines (41 loc) · 1.58 KB
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

Resolve errors for parent resources

This article describes the errors you may encounter when deploying a resource that is dependent on a parent resource.

Symptom

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."

Cause

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.

Solution

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.