Skip to content

Commit 23b2424

Browse files
authored
Merge pull request #296608 from mumian/0312-deployment-pane
Cover VS Code deployment pane
2 parents 6eb1a84 + 6a128a0 commit 23b2424

File tree

6 files changed

+83
-15
lines changed

6 files changed

+83
-15
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
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: 01/10/2025
5+
ms.date: 03/19/2025
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. You can deploy to any scope. This article shows how to deploy to a resource group.
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).
12+
13+
You can deploy to any scope. This article shows how to deploy to a resource group.
1214

1315
There are three ways you can find the command from an open Bicep file in Visual Studio Code:
1416

1517
- Right-click the Bicep file name from the Explorer pane instead of the one under **OPEN EDITORS**:
1618

17-
:::image type="content" source="./media/deploy-vscode/bicep-deploy-from-explorer.png" alt-text="Screenshot of Deploying Bicep File in the Context menu from the explore pane.":::
19+
:::image type="content" source="./media/deploy-vscode/bicep-deploy-from-explorer.png" alt-text="Screenshot of Deploying Bicep File in the Context menu from the explorer pane.":::
1820

1921
- Right-click anywhere inside a Bicep file, and then select **Deploy Bicep File**.
2022

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.date: 09/26/2024
1010

1111
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.
1212

13-
You can use the what-if operation with Azure PowerShell, Azure CLI, or REST API operations. What-if is supported for resource group, subscription, management group, and tenant level deployments.
13+
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.
1414

1515
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.
1616

11.4 KB
Loading
1.36 KB
Loading
22.5 KB
Loading

articles/azure-resource-manager/bicep/visual-studio-code.md

Lines changed: 77 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Create Bicep files with Visual Studio Code
33
description: Learn how to use Visual Studio Code to create Bicep files.
44
ms.topic: how-to
5-
ms.date: 01/10/2025
5+
ms.date: 03/21/2025
66
ms.custom: devx-track-bicep
77
---
88

@@ -29,15 +29,15 @@ These commands include:
2929
- [Create Bicep Configuration File](#create-bicep-configuration-file-command)
3030
- [Decompile into Bicep](#decompile-into-bicep-command)
3131
- [Deploy Bicep File](#deploy-bicep-file-command)
32-
- [Generate Parameters File](#generate-parameters-file-command)
32+
- [Generate Parameters File](#generate-parameters-file-command)
3333
- [Import Azure Kubernetes Manifest (EXPERIMENTAL)](#import-aks-manifest-preview-command)
34-
- [Insert Resource](#insert-resource-command)
34+
- [Insert Resource](#insert-resource-command)
3535
- [Open Bicep Visualizer](#open-bicep-visualizer-command)
3636
- [Open Bicep Visualizer to the Side](#open-bicep-visualizer-command)
37-
- [Paste JSON as Bicep](#paste-json-as-bicep-command)
38-
- [Restore Bicep Modules (Force)](#restore-bicep-modules-command)
39-
- [Show Deployment Pane](#show-deployment-pane-command)
40-
- [Show Deployment Pane to the Side](#show-deployment-pane-command)
37+
- [Paste JSON as Bicep](#paste-json-as-bicep-command)
38+
- [Restore Bicep Modules (Force)](#restore-bicep-modules-command)
39+
- [Show Deployment Pane](#show-deployment-pane-command)
40+
- [Show Deployment Pane to the Side](#show-deployment-pane-command)
4141

4242
These commands are also shown in the context menu when you right-click a Bicep file:
4343

@@ -191,13 +191,11 @@ You can undo the decompilation by pressing **<kbd>Ctrl+Z</kbd>**. The original J
191191

192192
### Restore Bicep Modules command
193193

194-
When your Bicep file uses modules that are published to a registry, the `restore` command gets copies of all the required modules from the registry. It stores those copies in a local cache. See [restore](./bicep-cli.md#restore) for more information and an example.
194+
When your Bicep file uses modules that are published to a registry, the `restore` command gets copies of all the required modules from the registry. It stores those copies in a local cache. For more information and an example, see [restore](./bicep-cli.md#restore).
195195

196196
### Show Deployment Pane command
197197

198-
The Deployment Pane is an experimental feature in Visual Studio Code. See [Using the Deployment Pane (Experimental!)](https://github.com/Azure/bicep/blob/main/docs/experimental/deploy-ui.md) to learn more.
199-
200-
You can open the Deployment Pane side by side with the Bicep file.
198+
See [Deployment pane](#deployment-pane).
201199

202200
## Use quick fix suggestions
203201

@@ -245,6 +243,74 @@ From Visual Studio Code, you can open the template reference for the resource ty
245243

246244
When defining a [module](./modules.md) and regardless of the type of file that's being referenced - a local file, module registry file, or a template spec - you can open the file by selecting or highlighting the module path and pressing **[F12]**. If the referenced file is an [Azure Verified Module, an AVM](https://aka.ms/avm), then you can toggle between the compiled JSON or Bicep file. To open the Bicep file of a private registry module, ensure that the module is published to the registry with the `WithSource` switch enabled. For more information, see [Publish files to registry](./private-module-registry.md#publish-files-to-registry). Visual Studio Code Bicep extension version 0.27.1 or newer is required for opening Bicep files from a private module registry.
247245

246+
## Deployment pane
247+
248+
The Deployment Pane is a UI panel that lets you connect to your Azure subscription and perform validate, deploy, and what-if operations, providing instant feedback without leaving the editor.
249+
250+
To use deployment pane:
251+
252+
1. Open a `.bicep` or `.bicepparam` file in VS Code.
253+
1. There are two ways to open the deployment pane:
254+
255+
- Select the show deployment pane button on the upper right corner as shown in the following screenshot:
256+
257+
:::image type="content" source="./media/visual-studio-code/visual-studio-code-open-deployment-pane.png" alt-text="Sceenshot of the open deployment pane button.":::
258+
259+
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.
260+
261+
- 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**.
262+
263+
:::image type="content" source="./media/visual-studio-code/visual-studio-code-show-deployment-pane.png" alt-text="Sceenshot of show deployment pane in command palette.":::
264+
265+
The following screenshot shows a successful deployment with the Bicep file validation results.
266+
267+
:::image type="content" source="./media/visual-studio-code/visual-studio-code-deployment-pane.png" alt-text="Sceenshot of deployment pane in Visual Studio Code.":::
268+
269+
1. Select **Change Scope** to define the deployment scope. After authentication, you're able to select the subscription and the resource group of your desired deployment.
270+
1. Select **Pick JSON Parameters File** to select a JSON parameter file.
271+
1. Select your desired action - **Deploy**, **Validate**, or **What-if**.
272+
273+
- **Deploy**: deploys to Azure, and the result including the defined output are shown in the deployment pane.
274+
- **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 checks for syntax errors, this validation interacts with Azure to detect potential deployment issues. It's equivalent to the validate command in Azure CLI and the Test command in Azure PowerShell. For example:
275+
276+
# [Azure CLI](#tab/azure-cli)
277+
278+
```azurecli
279+
az deployment group validate --resource-group <resource-group-name> --template-file <template-file-path>
280+
```
281+
282+
# [Azure PowerShell](#tab/azure-powershell)
283+
284+
```azurepowershell
285+
Test-AzResourceGroupDeployment -ResourceGroupName <ResourceGroupName> -TemplateFile <TemplateFilePath>
286+
```
287+
288+
---
289+
290+
- **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 example:
291+
292+
# [Azure CLI](#tab/azure-cli)
293+
294+
```azurecli
295+
az deployment group what-if --resource-group <resource-group-name> --template-file <template-file-path>
296+
```
297+
298+
# [Azure PowerShell](#tab/azure-powershell)
299+
300+
```azurepowershell
301+
New-AzResourceGroupDeployment -Whatif -ResourceGroupName <ResourceGroupName> -TemplateFile <TemplateFilePath>
302+
```
303+
304+
---
305+
306+
For more information, see one of the following articles:
307+
308+
- [Bicep deployment what-if operation](./deploy-what-if.md)
309+
- [Deploy Bicep files with Visual Studio Code](./deploy-vscode.md)
310+
- [Deploy Bicep files with Azure CLI](./deploy-cli.md)
311+
- [Deploy Bicep files with Azure PowerShell](./deploy-powershell.md)
312+
- [Deploy Bicep files with Azure cloud shell](./deploy-cloud-shell.md)
313+
248314
## Troubleshoot
249315
250316
The `Problems` pane summarizes the errors and warning in your Bicep file:

0 commit comments

Comments
 (0)