You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/troubleshooting/create-troubleshooting-template.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create a troubleshooting template
3
3
description: Describes how to create a template to troubleshoot Azure resource deployed with Azure Resource Manager templates (ARM templates) or Bicep files.
4
4
tags: top-support-issue
5
5
ms.topic: troubleshooting
6
-
ms.date: 11/02/2021
6
+
ms.date: 09/14/2022
7
7
---
8
8
9
9
# Create a troubleshooting template
@@ -32,7 +32,7 @@ The following ARM template and Bicep file get information from an existing stora
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/troubleshooting/enable-debug-logging.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Enable debug logging
3
3
description: Describes how to enable debug logging to troubleshoot Azure resources deployed with Bicep files or Azure Resource Manager templates (ARM templates).
4
4
tags: top-support-issue
5
5
ms.topic: troubleshooting
6
-
ms.date: 06/20/2022
6
+
ms.date: 09/14/2022
7
7
ms.custom: devx-track-azurepowershell
8
8
---
9
9
@@ -47,7 +47,7 @@ The `DeploymentDebugLogLevel` parameter is available for other deployment scopes
47
47
48
48
# [Azure CLI](#tab/azure-cli)
49
49
50
-
You can't enable debug logging with Azure CLI but you can get debug logging data using the `request` and `response` properties.
50
+
You can't enable debug logging with Azure CLI but you can get the debug log's data using the `request` and `response` properties.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/troubleshooting/find-error-code.md
+42-12Lines changed: 42 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Find error codes
3
3
description: Describes how to find error codes to troubleshoot Azure resources deployed with Azure Resource Manager templates (ARM templates) or Bicep files.
4
4
tags: top-support-issue
5
5
ms.topic: troubleshooting
6
-
ms.date: 05/16/2022
6
+
ms.date: 09/14/2022
7
7
ms.custom: devx-track-azurepowershell
8
8
---
9
9
@@ -15,17 +15,17 @@ When an Azure resource deployment fails using Azure Resource Manager templates (
15
15
16
16
There are three types of errors that are related to a deployment:
17
17
18
-
-**Validation errors** occur before a deployment begins and are caused by syntax errors in your file. Your editor can identify these errors.
18
+
-**Validation errors** occur before a deployment begins and are caused by syntax errors in your file. A code editor like Visual Studio Code can identify these errors.
19
19
-**Preflight validation errors** occur when a deployment command is run but resources aren't deployed. These errors are found without starting the deployment. For example, if a parameter value is incorrect, the error is found in preflight validation.
20
-
-**Deployment errors** occur during the deployment process and can only be found by assessing the deployment's progress.
20
+
-**Deployment errors** occur during the deployment process and can only be found by assessing the deployment's progress in your Azure environment.
21
21
22
22
All types of errors return an error code that you use to troubleshoot the deployment. Validation and preflight errors are shown in the activity log but don't appear in your deployment history. A Bicep file with syntax errors doesn't compile into JSON and isn't shown in the activity log.
23
23
24
24
To identify syntax errors, you can use [Visual Studio Code](https://code.visualstudio.com) with the latest [Bicep extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep) or [Azure Resource Manager Tools extension](https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools).
25
25
26
26
## Validation errors
27
27
28
-
Templates are validated during the deployment process and error codes are displayed. Before you run a deployment, you can run validation tests with Azure PowerShell or Azure CLI to identify validation and preflight errors.
28
+
Templates are validated during the deployment process and error codes are displayed. Before you run a deployment, you can identify validation and preflight errors by running validation tests with Azure PowerShell or Azure CLI.
29
29
30
30
# [Portal](#tab/azure-portal)
31
31
@@ -70,11 +70,15 @@ bicep build main.bicep
70
70
unexpected new line character.
71
71
```
72
72
73
-
There are more PowerShell cmdlets available to validate deployment templates:
73
+
### Other scopes
74
74
75
-
-[Test-AzDeployment](/powershell/module/az.resources/test-azdeployment) for subscription level deployments.
To see a deployment's operations messages with Azure CLI, use [az deployment operation group list](/cli/azure/deployment/operation/group#az-deployment-operation-group-list).
@@ -199,6 +219,16 @@ az deployment group show \
199
219
--name exampledeployment
200
220
```
201
221
222
+
### Other scopes
223
+
224
+
There are Azure CLI commands to get deployment information for the subscription, management group, and tenant scopes.
225
+
226
+
| Scope | Commands |
227
+
| ---- | ---- |
228
+
| Subscription |[az deployment operation sub list](/cli/azure/deployment/operation/sub#az-deployment-operation-sub-list) <br> [az deployment sub show](/cli/azure/deployment/sub#az-deployment-sub-show)|
title: Overview of ARM template and Bicep file troubleshooting
3
-
description: Describes troubleshooting for Azure resource deployment with Azure Resource Manager templates (ARM templates) and Bicep files.
2
+
title: Overview of deployment troubleshooting for Bicep files and ARM templates
3
+
description: Describes deployment troubleshooting when you use Bicep files or Azure Resource Manager templates (ARM templates) to deploy Azure resources.
4
4
ms.topic: overview
5
-
ms.date: 10/26/2021
5
+
ms.date: 09/14/2022
6
6
ms.custom: troubleshooting-overview
7
7
---
8
8
9
9
# What is deployment troubleshooting?
10
10
11
-
When you deploy Bicep files or Azure Resource Manager templates (ARM templates), you may get an error. This documentation helps you find possible solutions for the error.
11
+
When you deploy Azure resources with Bicep files or Azure Resource Manager templates (ARM templates), you may get an error. There are troubleshooting tools available to help you resolve syntax errors before deployment. You can get more information about error codes and deployment errors from the Azure portal, Azure PowerShell, and Azure CLI. This documentation helps you find solutions to troubleshoot errors.
12
12
13
13
## Error types
14
14
15
-
There are two types of errors you can get - **validation errors** and **deployment errors**.
15
+
Validation errors occur before a deployment begins and are caused by incorrect syntax that can be identified by a code editor like Visual Studio Code. For example, a misspelled property name or a function that's missing an argument.
16
16
17
-
Validation errors happen before the deployment is started. These errors can be determined without interacting with your current Azure environment. For example, validation makes you aware of syntax errors or missing arguments for a function before your deployment starts.
17
+
Preflight validation errors occur when a deployment command is run but resources aren't deployed in Azure. For example, if an incorrect parameter value is used, the deployment command returns an error message.
18
18
19
19
Deployment errors can only be determined by attempting the deployment and interacting with your Azure environment. For example, a virtual machine (VM) requires a network interface card (NIC). If the NIC doesn't exist when the VM is deployed, you get a deployment error.
20
20
21
21
## Troubleshooting tools
22
22
23
-
To help identify syntax errors before a deployment, use the latest version of [Visual Studio Code](https://code.visualstudio.com). Install the latest version of either:
23
+
There are several troubleshooting tools available to resolve errors.
To troubleshoot deployments, it's helpful to learn about a resource provider's properties or API versions. For more information, see [Define resources with Bicep and ARM templates](/azure/templates).
27
+
To help identify syntax errors before a deployment, use the latest version of [Visual Studio Code](https://code.visualstudio.com). Install the latest version of the extension for Bicep or ARM templates.
To follow best practices for developing your deployment templates, use the following tools:
29
33
30
-
To follow best practices for developing your templates, use either:
34
+
-[Bicep linter](../bicep/linter.md)
35
+
-[ARM template test toolkit](../templates/test-toolkit.md)
36
+
37
+
### Resource provider and API version
38
+
39
+
To troubleshoot deployments, it's helpful to learn about a resource provider's properties or API versions. For more information, see [Define resources with Bicep and ARM templates](/azure/templates).
31
40
32
-
*[Bicep linter](../bicep/linter.md)
33
-
*[ARM template test toolkit](../templates/test-toolkit.md)
41
+
### Error details
34
42
35
43
When you deploy, you can find the cause of errors from the Azure portal in a resource group's **Deployments** or **Activity log**. If you're using Azure PowerShell, use commands like [Get-AzResourceGroupDeploymentOperation](/powershell/module/az.resources/get-azresourcegroupdeploymentoperation) and [Get-AzActivityLog](/powershell/module/az.monitor/get-azactivitylog). For Azure CLI, use commands like [az deployment operation group](/cli/azure/deployment/operation/group) and [az monitor activity-log list](/cli/azure/monitor/activity-log#az-monitor-activity-log-list).
36
44
37
45
## Next steps
38
46
47
+
- To learn more about how to find deployment error codes and troubleshoot deployment problems, see [Find error codes](find-error-code.md).
39
48
- For solutions based on the error code, see [Troubleshoot common Azure deployment errors](common-deployment-errors.md).
40
-
- For an introduction to finding the error code, see [Quickstart: Troubleshoot ARM template deployments](quickstart-troubleshoot-arm-deployment.md) or [Quickstart: Troubleshoot Bicep file deployments](quickstart-troubleshoot-bicep-deployment.md).
49
+
- For an introduction to finding the error code, see [Quickstart: Troubleshoot ARM template JSON deployments](quickstart-troubleshoot-arm-deployment.md) or [Quickstart: Troubleshoot Bicep file deployments](quickstart-troubleshoot-bicep-deployment.md).
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/troubleshooting/quickstart-troubleshoot-arm-deployment.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Troubleshoot ARM template JSON deployments
3
3
description: Learn how to troubleshoot Azure Resource Manager template (ARM template) JSON deployments.
4
-
ms.date: 12/08/2021
4
+
ms.date: 09/14/2022
5
5
ms.topic: quickstart
6
6
ms.custom: devx-track-azurepowershell, mode-arm
7
7
---
@@ -14,9 +14,9 @@ This quickstart describes how to troubleshoot Azure Resource Manager template (A
14
14
15
15
There are three types of errors that are related to a deployment:
16
16
17
-
-**Validation errors** occur before a deployment begins and are caused by syntax errors in your file. Your editor can identify these errors.
17
+
-**Validation errors** occur before a deployment begins and are caused by syntax errors in your file. A code editor like Visual Studio Code can identify these errors.
18
18
-**Preflight validation errors** occur when a deployment command is run but resources aren't deployed. These errors are found without starting the deployment. For example, if a parameter value is incorrect, the error is found in preflight validation.
19
-
-**Deployment errors** occur during the deployment process and can only be found by assessing the deployment's progress.
19
+
-**Deployment errors** occur during the deployment process and can only be found by assessing the deployment's progress in your Azure environment.
20
20
21
21
All types of errors return an error code that you use to troubleshoot the deployment. Validation and preflight errors are shown in the activity log but don't appear in your deployment history.
22
22
@@ -142,7 +142,7 @@ The template fails preflight validation and the deployment isn't run. The `prefi
142
142
143
143
Storage names must be between 3 and 24 characters and use only lowercase letters and numbers. The prefix value created an invalid storage name. For more information, see [Resolve errors for storage account names](error-storage-account-name.md). To fix the preflight error, use a prefix that's 11 characters or less and contains only lowercase letters or numbers.
144
144
145
-
Because the deployment didn't run there's no deployment history.
145
+
Because the deployment didn't run, there's no deployment history.
146
146
147
147
:::image type="content" source="media/quickstart-troubleshoot-arm-deployment/preflight-no-deploy.png" alt-text="Screenshot of resource group overview that shows no deployment for preflight error.":::
148
148
@@ -180,7 +180,7 @@ The deployment begins and is visible in the deployment history. The deployment f
180
180
181
181
:::image type="content" source="media/quickstart-troubleshoot-arm-deployment/deployment-failed.png" alt-text="Screenshot of resource group overview that shows a failed deployment.":::
182
182
183
-
To fix the deployment error you would change the reference function to use a valid resource. For more information, see [Resolve resource not found errors](error-not-found.md). For this quickstart, delete the comma that precedes `vnetResult` and all of `vnetResult`. Save the file and rerun the deployment.
183
+
To fix the deployment error, change the reference function to use a valid resource. For more information, see [Resolve resource not found errors](error-not-found.md). For this quickstart, delete the comma that precedes `vnetResult` and all of `vnetResult`. Save the file and rerun the deployment.
0 commit comments