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 there ways you can find the command:

  • Right-click the Bicep file name from the Explorer pane, not the one under OPEN EDITORS:

    Screenshot of Deploying Bicep File in the Context menu from the explore pane.

  • 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.

    Screenshot of Deploy Bicep File in the Context menu.

After you select the command, you follow the wizard to enter the values:

  1. Sign in to Azure and select subscription.

    Screenshot of Select subscription.

    Note

    The Bicep deploy command from within vscode uses the Azure Account extension for authentication. It doesn't use cloud profiles from bicepconfig.json.

  2. Select or create a resource group.

  3. Select a parameter file or select None to enter the parameter values.

    Screenshot of Select parameter file.

  4. If you choose None, enter the parameter values.

    Screenshot of Enter parameter values.

    After you enter the values, you have the option to create a parameters file from values used in this deployment:

    Screenshot of Create parameter file.

    If you select Yes, a parameter 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