Deploy Bicep files from Visual Studio Code
You can use Visual Studio Code with the Bicep extension to deploy a Bicep file. You can deploy to any scope. This article shows deploying to a resource group.
From an opened Bicep file in VS Code, there are three ways you can find the command:
Right-click the Bicep file name from the Explorer pane, not the one under OPEN EDITORS:
Right-click anywhere inside a Bicep file, and then select Deploy Bicep File.
Select Command Palette from the View menu, and then select Bicep: Deploy Bicep File.
After you select the command, you follow the wizard to enter the values:
If you're not signed in, follow the instructions provided in the prompt to complete the sign-in process.
Note
The Bicep deploy command in Visual Studio Code uses the new built-in authentication API for managing authentication. It doesn't use cloud profiles from bicepconfig.json. To sign in to a custom cloud, select Manage > Settings > Extension > Microsoft accounts > Microsoft Sovereign Cloud. At this time, multiple signed-in accounts aren't supported.
Select or create a resource group.
Select a parameters file or select None to enter the parameter values.
If you choose None, enter the parameter values.
After you enter the values, you have the option to create a parameters file from values used in this deployment:
If you select Yes, a parameters file with the file name <Bicep-file-name>.parameters.json is created in the same folder.
For more information about VS Code commands, see Visual Studio Code.
Next steps
- For more information about deployment commands, see Deploy resources with Bicep and Azure CLI and Deploy resources with Bicep and Azure PowerShell.
- To preview changes before deploying a Bicep file, see Bicep deployment what-if operation.