Skip to content

Commit cdd9974

Browse files
committed
fix headings and edits
1 parent 161ab9b commit cdd9974

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

articles/azure-resource-manager/troubleshooting/error-not-found.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
title: Resource not found errors
33
description: Describes how to resolve errors when a resource can't be found. The error might occur when you deploy a Bicep file or Azure Resource Manager template, or when doing management tasks.
44
ms.topic: troubleshooting
5-
ms.date: 11/30/2021
5+
ms.date: 09/12/2022
66
ms.custom: devx-track-azurepowershell
77
---
88

9-
# Resolve Resource Not Found errors
9+
# Resolve resource not found errors
1010

1111
This article describes the error you see when a resource can't be found during an operation. Typically, you see this error when deploying resources with a Bicep file or Azure Resource Manager template (ARM template). You also see this error when doing management tasks and Azure Resource Manager can't find the required resource. For example, if you try to add tags to a resource that doesn't exist, you receive this error.
1212

@@ -31,7 +31,7 @@ group {resource group name} was not found.
3131

3232
Resource Manager needs to retrieve the properties for a resource, but can't find the resource in your subscription.
3333

34-
## Solution 1 - Check resource properties
34+
## Solution 1: Check resource properties
3535

3636
When you receive this error while doing a management task, check the values you provided for the resource. The three values to check are:
3737

@@ -43,7 +43,7 @@ If you're using PowerShell or Azure CLI, check that you're running commands in t
4343

4444
If you can't verify the properties, sign in to the [Microsoft Azure portal](https://portal.azure.com). Find the resource you're trying to use and examine the resource name, resource group, and subscription.
4545

46-
## Solution 2 - Set Dependencies
46+
## Solution 2: Set dependencies
4747

4848
If you get this error when deploying a template, you may need to add a dependency. Resource Manager optimizes deployments by creating resources in parallel, when possible.
4949

@@ -56,13 +56,13 @@ Use an [implicit dependency](../bicep/resource-dependencies.md#implicit-dependen
5656
For example, the web app's `serverFarmId` property uses `servicePlan.id` to create a dependency on the App Service plan.
5757

5858
```bicep
59-
resource webApp 'Microsoft.Web/sites@2021-02-01' = {
59+
resource webApp 'Microsoft.Web/sites@2022-03-01' = {
6060
properties: {
6161
serverFarmId: servicePlan.id
6262
}
6363
}
6464
65-
resource servicePlan 'Microsoft.Web/serverfarms@2021-02-01' = {
65+
resource servicePlan 'Microsoft.Web/serverfarms@2022-03-01' = {
6666
name: hostingPlanName
6767
...
6868
```
@@ -73,12 +73,12 @@ Avoid setting dependencies that aren't needed. Unnecessary dependencies prolong
7373

7474
# [JSON](#tab/json)
7575

76-
If one resource must be deployed after another resource, you need to use the [dependsOn](../templates/resource-dependency.md#dependson) element in your template.
76+
If a resource must be deployed after another resource, use the [dependsOn](../templates/resource-dependency.md#dependson) element in your template.
7777

7878
```json
7979
{
8080
"type": "Microsoft.Web/sites",
81-
"apiVersion": "2021-02-01",
81+
"apiVersion": "2022-03-01",
8282
"dependsOn": [
8383
"[variables('hostingPlanName')]"
8484
],
@@ -107,15 +107,15 @@ When you see dependency problems, you need to gain insight into the order of res
107107

108108
:::image type="content" source="media/error-not-found/select-deployment-events.png" alt-text="Screenshot that highlights the link to a deployment's related events.":::
109109

110-
1. Examine the sequence of events for each resource. Pay attention to the status of each operation and it's time stamp. For example, the following image shows three storage accounts that deployed in parallel. Notice that the three storage accounts are started at the same time.
110+
1. Examine the sequence of events for each resource. Pay attention to the status of each operation and it's time stamp. For example, the following image shows three storage accounts that deployed in parallel. Notice that the three storage account deployments started at the same time.
111111

112112
:::image type="content" source="media/error-not-found/deployment-events-parallel.png" alt-text="Screenshot of activity log for resources deployed in parallel.":::
113113

114114
The next image shows three storage accounts that aren't deployed in parallel. The second storage account depends on the first storage account, and the third storage account depends on the second storage account. The first storage account is labeled **Started**, **Accepted**, and **Succeeded** before the next is started.
115115

116116
:::image type="content" source="media/error-not-found/deployment-events-sequence.png" alt-text="Screenshot of activity log for resources deployed in sequential order.":::
117117

118-
## Solution 3 - Get external resource
118+
## Solution 3: Get external resource
119119

120120
# [Bicep](#tab/bicep)
121121

@@ -124,12 +124,12 @@ Bicep uses the symbolic name to create an [implicit dependency](../bicep/resourc
124124
In this example, a web app is deployed that uses an existing App Service plan from another resource group.
125125

126126
```bicep
127-
resource servicePlan 'Microsoft.Web/serverfarms@2021-02-01' existing = {
127+
resource servicePlan 'Microsoft.Web/serverfarms@2022-03-01' existing = {
128128
name: hostingPlanName
129129
scope: resourceGroup(rgname)
130130
}
131131
132-
resource webApp 'Microsoft.Web/sites@2021-02-01' = {
132+
resource webApp 'Microsoft.Web/sites@2022-03-01' = {
133133
name: siteName
134134
properties: {
135135
serverFarmId: servicePlan.id
@@ -154,7 +154,7 @@ The following example gets the resource ID for a resource that exists in a diffe
154154

155155
---
156156

157-
## Solution 4 - Get managed identity from resource
157+
## Solution 4: Get managed identity from resource
158158

159159
# [Bicep](#tab/bicep)
160160

@@ -188,18 +188,18 @@ The pattern is:
188188
For example, to get the principal ID for a managed identity that is applied to a virtual machine, use:
189189

190190
```json
191-
"[reference(resourceId('Microsoft.Compute/virtualMachines', variables('vmName')), '2021-07-01', 'Full').identity.principalId]",
191+
"[reference(resourceId('Microsoft.Compute/virtualMachines', variables('vmName')), '2022-03-01', 'Full').identity.principalId]",
192192
```
193193

194194
Or, to get the tenant ID for a managed identity that is applied to a virtual machine scale set, use:
195195

196196
```json
197-
"[reference(resourceId('Microsoft.Compute/virtualMachineScaleSets', variables('vmNodeType0Name')), '2021-07-01', 'Full').Identity.tenantId]"
197+
"[reference(resourceId('Microsoft.Compute/virtualMachineScaleSets', variables('vmNodeType0Name')), '2022-03-01', 'Full').Identity.tenantId]"
198198
```
199199

200200
---
201201

202-
## Solution 5 - Check functions
202+
## Solution 5: Check functions
203203

204204
# [Bicep](#tab/bicep)
205205

@@ -208,23 +208,23 @@ You can use a resource's symbolic name to get values from a resource. You can re
208208
The following example references an existing storage account in a different resource group.
209209

210210
```bicep
211-
resource stgAcct 'Microsoft.Storage/storageAccounts@2021-06-01' existing = {
211+
resource stgAcct 'Microsoft.Storage/storageAccounts@2022-05-01' existing = {
212212
name: stgname
213213
scope: resourceGroup(rgname)
214214
}
215215
```
216216

217217
# [JSON](#tab/json)
218218

219-
When deploying a template, look for expressions that use the [reference](../templates/template-functions-resource.md#reference) or [listKeys](../templates/template-functions-resource.md#listkeys) functions. The values you provide vary based on whether the resource is in the same template, resource group, and subscription. Check that you're providing the required parameter values for your scenario. If the resource is in a different resource group, provide the full resource ID. For example, to reference a storage account in another resource group, use:
219+
When you deploy a template, look for expressions that use the [reference](../templates/template-functions-resource.md#reference) or [listKeys](../templates/template-functions-resource.md#listkeys) functions. The values you provide vary based on whether the resource is in the same template, resource group, and subscription. Check that you're providing the required parameter values for your scenario. If the resource is in a different resource group, provide the full resource ID. For example, to reference a storage account in another resource group, use:
220220

221221
```json
222-
"[reference(resourceId('exampleResourceGroup', 'Microsoft.Storage/storageAccounts', 'myStorage'), '2021-06-01')]"
222+
"[reference(resourceId('exampleResourceGroup', 'Microsoft.Storage/storageAccounts', 'myStorage'), '2022-05-01')]"
223223
```
224224

225225
---
226226

227-
## Solution 6 - After deleting resource
227+
## Solution 6: After deleting resource
228228

229229
When you delete a resource, there might be a short amount of time when the resource appears in the portal but isn't available. If you select the resource, you'll get an error that the resource is **Not found**.
230230

0 commit comments

Comments
 (0)