Skip to content

Commit 2660e1a

Browse files
committed
Add the new vscode Bicep extension commands
1 parent fa8d654 commit 2660e1a

File tree

2 files changed

+31
-17
lines changed

2 files changed

+31
-17
lines changed
-13.7 KB
Loading

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

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Open or create a Bicep file in VS Code, select the **View** menu and then **Comm
2525
These commands include:
2626

2727
- [Build ARM Template](#build-arm-template)
28+
- [Build Parameters File](#build-parameters-file)
2829
- [Create Bicep Configuration File](#create-bicep-configuration-file)
2930
- [Decompile into Bicep](#decompile-into-bicep)
3031
- [Deploy Bicep File](#deploy-bicep-file)
@@ -33,7 +34,10 @@ These commands include:
3334
- [Insert Resource](#insert-resource)
3435
- [Open Bicep Visualizer](#open-bicep-visualizer)
3536
- [Open Bicep Visualizer to the side](#open-bicep-visualizer)
37+
- [Paste JSON as Bicep](#paste-as-bicep)
3638
- [Restore Bicep Modules (Force)](#restore-bicep-modules)
39+
- [Show Deployment Pane](#show-deployment-pane)
40+
- [Show Deployment Pane to the Side](#show-deployment-pane)
3741

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

@@ -45,7 +49,11 @@ When you right-click a JSON file:
4549

4650
### Build ARM template
4751

48-
The `build` command converts a Bicep file to an Azure Resource Manager template (ARM template). The new JSON template is stored in the same folder with the same file name. If a file with the same file name exists, it overwrites the old file. For more information, see [Bicep CLI commands](./bicep-cli.md#bicep-cli-commands).
52+
The `build` command converts a Bicep file to an Azure Resource Manager template (ARM template). The new JSON template is stored in the same folder with the same file name. If a file with the same file name exists, it overwrites the old file. For more information, see [Bicep CLI commands](./bicep-cli.md#build).
53+
54+
### Build parameters file
55+
56+
The `build` command converts a [Bicep parameters file](./parameter-files.md#parameters-file) to a [JSON parameters file](../templates/parameter-files.md#parameter-file). The new JSON parameters file is stored in the same folder with the same file name. If a file with the same file name exists, it overwrites the old file. For more information, see [Bicep CLI commands](./bicep-cli.md#build-params).
4957

5058
### Create Bicep configuration file
5159

@@ -115,21 +123,7 @@ The visualizer shows the resources defined in the Bicep file with the resource d
115123

116124
You can also open the visualizer side-by-side with the Bicep file.
117125

118-
### Restore Bicep modules
119-
120-
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, see [restore](./bicep-cli.md#restore).
121-
122-
## View documentation
123-
124-
From Visual Studio Code, you can open the template reference for the resource type you're working on. To do so, hover your cursor over the resource symbolic name, and then select **View Documentation**.
125-
126-
:::image type="content" source="./media/visual-studio-code/visual-studio-code-bicep-view-type-document.png" alt-text="Screenshot of Visual Studio Code Bicep view type document.":::
127-
128-
## Go to definition
129-
130-
When defining a [module](./modules.md) and regardless of the type of file that's being referenced - whether it's a local file, module registry file, or a template spec - you can open the file by selecting or highlighting the module path and then press **[F12]**. If the referenced file is an [Azure Verified Modules(AVM)](https://aka.ms/avm), you can toggle between 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). The Visual Studio Code Bicep extension version 0.27.1 or newer is required for opening Bicep files from a private module registry.
131-
132-
## Paste as Bicep
126+
### Paste as Bicep
133127

134128
You can paste a JSON snippet from an ARM template to a Bicep file. Visual Studio Code automatically decompiles the JSON to Bicep. This feature is only available with the Bicep extension version 0.14.0 or newer, and it's enabled by default. To disable the feature, see [VS Code and Bicep extension](./install.md#visual-studio-code-and-bicep-extension).
135129

@@ -195,14 +189,34 @@ Visual Studio Code automatically converts the JSON to Bicep. Notice that you als
195189

196190
You can undo the decompilation by using <kbd>Ctrl+Z</kbd>. The original JSON appears in the file.
197191

192+
### Restore Bicep modules
193+
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, see [restore](./bicep-cli.md#restore).
195+
196+
### Show deployment pane
197+
198+
The Bicep Deployment Pane is an experimental feature. For more information, see [Using the Deployment Pane](https://github.com/Azure/bicep/blob/main/docs/experimental/deploy-ui.md).
199+
200+
You can also open the deployment pane side-by-side with the Bicep file.
201+
202+
## View documentation
203+
204+
From Visual Studio Code, you can open the template reference for the resource type you're working on. To do so, hover your cursor over the resource symbolic name, and then select **View Documentation**.
205+
206+
:::image type="content" source="./media/visual-studio-code/visual-studio-code-bicep-view-type-document.png" alt-text="Screenshot of Visual Studio Code Bicep view type document.":::
207+
208+
## Go to definition
209+
210+
When defining a [module](./modules.md) and regardless of the type of file that's being referenced - whether it's a local file, module registry file, or a template spec - you can open the file by selecting or highlighting the module path and then press **[F12]**. If the referenced file is an [Azure Verified Modules(AVM)](https://aka.ms/avm), you can toggle between 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). The Visual Studio Code Bicep extension version 0.27.1 or newer is required for opening Bicep files from a private module registry.
211+
198212
## Troubleshoot
199213

200214
The `Problems` pane summarizes the errors and warning in your Bicep file:
201215

202216
:::image type="content" source="./media/visual-studio-code/visual-studio-code-bicep-problems-pane.png" alt-text="Screenshot of Visual Studio Code Bicep problems pane.":::
203217

204218
For the list of error/warning codes, see [Bicep error/warning codes](./bicep-error-codes.md).
205-
219+
206220
## Next steps
207221

208222
To walk through a quickstart tutorial, see [Quickstart: Create Bicep files with Visual Studio Code](./quickstart-create-bicep-use-visual-studio-code.md).

0 commit comments

Comments
 (0)