Skip to content

Commit 5e09d42

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 76fc13d + 0f51331 commit 5e09d42

11 files changed

Lines changed: 73 additions & 89 deletions

articles/azure-resource-manager/bicep/deploy-vscode.md

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,61 @@
22
title: Deploy Bicep files with Visual Studio Code
33
description: Learn how to use Visual Studio Code to deploy Bicep files.
44
ms.topic: how-to
5-
ms.date: 10/30/2025
5+
ms.date: 01/07/2026
66
ms.custom: devx-track-bicep
77
---
88

99
# Deploy Bicep files with Visual Studio Code
1010

11-
You can use [Visual Studio Code with the Bicep extension](./visual-studio-code.md#deploy-bicep-file-command) to deploy a Bicep file. Additionally, Bicep files can also be deployed from deployment pane. For more information, see [Deployment pane](./visual-studio-code.md#deployment-pane).
11+
You can use [Visual Studio Code with the Bicep extension](./visual-studio-code.md#deploy-bicep-file-command) to deploy a Bicep file. The Bicep extension provides two options for deploying Bicep files in Visual Studio Code - the [Deployment Pane](#deployment-pane) and the [Deploy Command](#deploy-command). The fast feedback, validate, and what-if capabilities of the Deployment Pane are useful for quick iteration while authoring, whereas the Deploy Command is useful for a fire-and-forget deployment experience.
12+
13+
## Deployment Pane
14+
15+
The deployment pane provides an interactive UI in VS Code that can access your Azure account to perform validate, deploy, and what-if operations, providing instant feedback without leaving the editor.
16+
17+
To use the deployment pane:
18+
19+
1. Open a `.bicep` or `.bicepparam` file in VS Code.
20+
1. There are two ways to open the deployment pane:
21+
22+
- Select the show deployment pane button on the upper right corner as shown in the following screenshot:
23+
24+
:::image type="content" source="./media/deploy-vscode/visual-studio-code-open-deployment-pane.png" alt-text="Screenshot of the open deployment pane button.":::
25+
26+
By default, VS Code opens the deployment pane on the side. To open it in a new tab, hold <kbd>Alt</kbd> while selecting the button.
27+
28+
- Another way to open the deployment pane is through the command palette. Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>, then select either **Show Deployment Pane** or **Show Deployment Pane to the Side**.
29+
30+
:::image type="content" source="./media/deploy-vscode/visual-studio-code-show-deployment-pane.png" alt-text="Screenshot of show deployment pane in command palette.":::
31+
32+
The deployment pane appears as shown in the following screenshot:
33+
34+
:::image type="content" source="./media/deploy-vscode/visual-studio-code-deployment-pane.png" alt-text="Screenshot of initial deployment pane in Visual Studio Code.":::
35+
36+
1. Select **Pick Scope** to define the deployment scope. After authentication, you're able to select the subscription and the resource group of your desired deployment.
37+
1. If the deployment pane was opened for a .bicep file, fill out your desired parameter values, or select **Pick JSON Parameters File** to select a JSON parameter file.
38+
39+
:::image type="content" source="./media/deploy-vscode/visual-studio-code-deployment-pane-pick-parameters-file.png" alt-text="Screenshot of picking parameters file in the deployment pane in Visual Studio Code.":::
40+
41+
1. Select your desired action - **Deploy**, **Validate**, or **What-if**.
42+
43+
- **Deploy**: deploys to Azure, and the result including the defined output are shown in the deployment pane.
44+
45+
The following screenshot shows a successful deployment. You can select the blue globe icon to view the deployment or individual resources in the Azure portal.
46+
47+
:::image type="content" source="./media/deploy-vscode/visual-studio-code-deployment-pane-successful-deployment.png" alt-text="Screenshot of deployment pane in Visual Studio Code.":::
48+
49+
- **Validate**: performs a runtime validation of the Bicep file against Azure, ensuring that the resources, parameters, and policies are correct in the actual deployment environment. Unlike a [linter](./linter.md), which only performs offline validation, this validation interacts with Azure to detect potential deployment issues.
50+
51+
The following screenshot shows an example of a validation failure.
52+
53+
:::image type="content" source="./media/deploy-vscode/visual-studio-code-deployment-pane-validation-error.png" alt-text="Screenshot of deployment pane validation error in Visual Studio Code.":::
54+
55+
- **What-if**: executes a **What-If** analysis directly from the deployment pane. The pane displays the results, showing any planned changes. This performs the same function as the what-if command in Azure PowerShell and Azure CLI. For more information, see [Bicep deployment what-if operation](./deploy-what-if.md)
56+
57+
You can keep the deployment pane open while you iterate on changes to your .bicep or .bicepparam files. If you save and rerun one of the above actions, the actions run against your updated files.
58+
59+
## Deploy Command
1260

1361
You can deploy to any scope. This article shows how to deploy to a resource group.
1462

@@ -53,4 +101,4 @@ See [Create Bicep files with Visual Studio Code](./visual-studio-code.md) for mo
53101
## Next steps
54102

55103
- For more information about deployment commands, see [Deploy Bicep files with the Azure CLI](./deploy-cli.md) and [Azure PowerShell](./deploy-powershell.md).
56-
- To preview changes before deploying a Bicep file, see [Bicep deployment what-if operation](./deploy-what-if.md).
104+
- To preview changes before deploying a Bicep file, see [Bicep deployment what-if operation](./deploy-what-if.md).

articles/azure-resource-manager/bicep/deploy-what-if.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 'Bicep What-If: Preview Changes Before Deployment'
33
description: Determine what changes will happen to your resources before deploying a Bicep file.
44
ms.topic: article
5-
ms.date: 12/10/2025
5+
ms.date: 01/07/2026
66
ms.custom:
77
- devx-track-bicep, devx-track-azurecli, devx-track-azurepowershell
88
- ai-gen-docs-bap
@@ -13,9 +13,9 @@ ms.custom:
1313

1414
# Bicep What-If: Preview Changes Before Deployment
1515

16-
Before deploying a Bicep file, you can preview the changes that will happen. Azure Resource Manager (ARM) provides the what-if operation to let you see how resources will change if you deploy the Bicep file. The what-if operation doesn't make any changes to existing resources. Instead, it predicts the changes if the specified Bicep file is deployed.
16+
Before deploying a Bicep file, you can preview the changes that will happen. Azure Resource Manager provides the what-if operation to let you see how resources will change if you deploy the Bicep file. The what-if operation doesn't make any changes to existing resources. Instead, it predicts the changes if the specified Bicep file is deployed.
1717

18-
You can use the what-if operation with [Visual Studio Code](./visual-studio-code.md#deployment-pane), Azure PowerShell, Azure CLI, or REST API operations. What-if is supported for resource group, subscription, management group, and tenant level deployments.
18+
You can use the what-if operation with [Visual Studio Code](./deploy-vscode.md#deployment-pane), Azure PowerShell, Azure CLI, or REST API operations. What-if is supported for resource group, subscription, management group, and tenant level deployments.
1919

2020
During What-If operations, the evaluation and expansion of `templateLink` aren't supported. As a result, any resources deployed using template links within nested deployments, including template spec references, won't be visible in the What-If operation results.
2121

@@ -55,11 +55,11 @@ When one of the limits is reached, the remaining resources' [change type](#chang
5555

5656
### Short-circuiting
5757

58-
The what-if operation in Bicep deployments may encounter "short-circuiting," a scenario where the service cannot fully analyze a module or resource due to the deployment's structure or dependencies on external state. Short-circuiting of an individual resource occurs when its resource ID or API version cannot be calculated outside the deployment context, often due to unresolved expressions or external dependencies. For more information, see [Unevaluated expressions](#unevaluated-expressions). While rare, short-circuiting of modules or nested deployment resources can also happen, resulting in all resources within the module being excluded from the what-if analysis results. In such cases, the API response includes a diagnostic message to indicate the issue.
58+
The what-if operation in Bicep deployments may encounter "short-circuiting," a scenario where the service can't fully analyze a module or resource due to the deployment's structure or dependencies on external state. Short-circuiting of an individual resource occurs when its resource ID or API version can't be calculated outside the deployment context, often due to unresolved expressions or external dependencies. For more information, see [Unevaluated expressions](#unevaluated-expressions). While rare, short-circuiting of modules or nested deployment resources can also happen, resulting in all resources within the module being excluded from the what-if analysis results. In such cases, the API response includes a diagnostic message to indicate the issue.
5959

6060
## Running the what-if operation
6161

62-
Using a recent version of the Az PowerShell module (13.1.0 or later) or the Azure CLI (2.75.0 or later) will provide diagnostics when what-if cannot analyze part of the deployment. Earlier versions of these tools behave the same way, but they do not display the diagnostics. For example, if you use CLI version 2.74.0, the issue still occurs-it just happens silently.
62+
Using a recent version of the Az PowerShell module (13.1.0 or later) or the Azure CLI (2.75.0 or later) will provide diagnostics when what-if can't analyze part of the deployment. Earlier versions of these tools behave the same way, but they don't display the diagnostics. For example, if you use CLI version 2.74.0, the issue still occurs-it just happens silently.
6363

6464
### What-if commands
6565

@@ -72,11 +72,11 @@ To preview changes before deploying a Bicep file, use:
7272
- [az deployment mg what-if](/cli/azure/deployment/mg#az-deployment-mg-what-if) for management group deployments
7373
- [az deployment tenant what-if](/cli/azure/deployment/tenant#az-deployment-tenant-what-if) for tenant deployments
7474

75-
Azure CLI version **2.76.0 or later** introduces the `--validation-level` switch to determine how thoroughly ARM validates the Bicep template during this process. It accepts the following values:
75+
Azure CLI version **2.76.0 or later** introduces the `--validation-level` switch to determine how thoroughly Azure Resource Manager validates the Bicep template during this process. It accepts the following values:
7676

7777
- **Provider** (default): Performs full validation, including template syntax, resource definitions, dependencies, and permission checks to ensure you have sufficient permissions to deploy all resources in the template.
7878
- **ProviderNoRbac**: Performs full validation of the template and resources, similar to Provider, but only checks for read permissions on each resource instead of full deployment permissions. This is useful when you want to validate resource configurations without requiring full access.
79-
- **Template**: Performs static validation only, checking template syntax and structure while skipping preflight checks (e.g., resource availability) and permission checks. This is less thorough, potentially missing issues that could cause deployment failures.
79+
- **Template**: Performs static validation only, checking template syntax and structure while skipping preflight checks (for example, resource availability) and permission checks. This is less thorough, potentially missing issues that could cause deployment failures.
8080

8181
You can use the `--confirm-with-what-if` switch (or its short form `-c`) to preview the changes and get prompted to continue with the deployment. Add this switch to:
8282

@@ -98,11 +98,11 @@ To preview changes before deploying a Bicep file, use [New-AzResourceGroupDeploy
9898
- `New-AzResourceGroupDeployment -Whatif` for resource group deployments
9999
- `New-AzSubscriptionDeployment -Whatif` and `New-AzDeployment -Whatif` for subscription level deployments
100100

101-
Azure PowerShell version **13.4.0 or later** introduces the `-ValidationLevel` switch to determine how thoroughly ARM validates the Bicep template during this process. It accepts the following values:
101+
Azure PowerShell version **13.4.0 or later** introduces the `-ValidationLevel` switch to determine how thoroughly Azure Resource Manager validates the Bicep template during this process. It accepts the following values:
102102

103103
- **Provider** (default): Performs full validation, including template syntax, resource definitions, dependencies, and permission checks to ensure you have sufficient permissions to deploy all resources in the template.
104104
- **ProviderNoRbac**: Performs full validation of the template and resources, similar to Provider, but only checks for read permissions on each resource instead of full deployment permissions. This is useful when you want to validate resource configurations without requiring full access.
105-
- **Template**: Performs static validation only, checking template syntax and structure while skipping preflight checks (e.g., resource availability) and permission checks. This is less thorough, potentially missing issues that could cause deployment failures.
105+
- **Template**: Performs static validation only, checking template syntax and structure while skipping preflight checks (for example, resource availability) and permission checks. This is less thorough, potentially missing issues that could cause deployment failures.
106106

107107
You can use the `-Confirm` switch parameter to preview the changes and get prompted to continue with the deployment.
108108

@@ -414,7 +414,7 @@ Resource changes: 1 to modify.
414414
```
415415

416416
> [!NOTE]
417-
> The what-if operation can't resolve the [reference function](./bicep-functions-resource.md#reference). Every time you set a property to a template expression that includes the reference function, what-if reports the property will change. This behavior happens because what-if compares the current value of the property (such as `true` or `false` for a boolean value) with the unresolved template expression. Obviously, these values will not match. When you deploy the Bicep file, the property will only change when the template expression resolves to a different value.
417+
> The what-if operation can't resolve the [reference function](./bicep-functions-resource.md#reference). Every time you set a property to a template expression that includes the reference function, what-if reports the property will change. This behavior happens because what-if compares the current value of the property (such as `true` or `false` for a boolean value) with the unresolved template expression. Obviously, these values won't match. When you deploy the Bicep file, the property will only change when the template expression resolves to a different value.
418418
419419
### Change types
420420

@@ -489,7 +489,7 @@ The following results show the two different output formats:
489489

490490
### Unevaluated expressions
491491

492-
If an unevaluated expression appears in the output, it means what-if cannot evaluate it outside the context of a deployment. The expression is shown as-is to indicate the information that will be filled in when the deployment is executed.
492+
If an unevaluated expression appears in the output, it means what-if can't evaluate it outside the context of a deployment. The expression is shown as-is to indicate the information that will be filled in when the deployment is executed.
493493

494494
```bicep
495495
param now string = utcNow()
@@ -527,12 +527,12 @@ Scope: /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/jgaote
527527
Resource changes: 1 to modify.
528528
```
529529

530-
The following expressions are not evaluated during what-if:
530+
The following expressions aren't evaluated during what-if:
531531

532-
- Non-deterministic functions, such as [newGuid()](./bicep-functions-string.md#newguid) and [utcNow()](./bicep-functions-date.md#utcnow)
532+
- Nondeterministic functions, such as [newGuid()](./bicep-functions-string.md#newguid) and [utcNow()](./bicep-functions-date.md#utcnow)
533533
- Any reference to a [secure parameter value](./parameters.md#secure-parameters).
534-
- References to resources that are not deployed in the same template.
535-
- References to resource properties that are not defined in the same template.
534+
- References to resources that aren't deployed in the same template.
535+
- References to resource properties that aren't defined in the same template.
536536
- Any resource function, such as [listKeys()](./bicep-functions-resource.md#listkeys).
537537

538538
## Clean up resources
12 KB
Loading
47.9 KB
Loading
135 KB
Loading
14.6 KB
Loading
11.7 KB
Loading

articles/azure-resource-manager/bicep/media/visual-studio-code/visual-studio-code-show-deployment-pane.png renamed to articles/azure-resource-manager/bicep/media/deploy-vscode/visual-studio-code-show-deployment-pane.png

File renamed without changes.
34 Bytes
Loading

0 commit comments

Comments
 (0)