Skip to content

Latest commit

 

History

History
66 lines (46 loc) · 2.55 KB

File metadata and controls

66 lines (46 loc) · 2.55 KB
title Deploy Bicep files with Cloud Shell
description Use Azure Resource Manager and Azure Cloud Shell to deploy resources to Azure. The resources are defined in a Bicep file.
ms.topic how-to
ms.custom devx-track-bicep, devx-track-arm-template
ms.date 08/15/2025

Deploy Bicep files from Azure Cloud Shell

You can use Azure Cloud Shell to deploy a Bicep file. Currently you can only deploy a local Bicep file from the Cloud Shell.

You can deploy to any scope. This article shows deploying to a resource group.

In this article, you'll learn how to:

  • Upload a Bicep file to Cloud Shell
  • Deploy the file using Azure CLI or PowerShell
  • Verify your deployment was successful

Deploy local Bicep file

To deploy a local Bicep file, you must first upload your Bicep file to your Cloud Shell session.

  1. Sign in to the Cloud Shell.

  2. Select either PowerShell or Bash.

    :::image type="content" source="./media/deploy-cloud-shell/bicep-cloud-shell-bash-powershell.png" alt-text="Select Bash or PowerShell":::

  3. Select Upload/Download files, and then select Upload.

    :::image type="content" source="./media/deploy-cloud-shell/bicep-cloud-shell-upload.png" alt-text="Upload file":::

  4. Select the Bicep file you want to upload, and then select Open.

  5. To deploy the Bicep file, use the following commands. These commands create a resource group and deploy your Bicep template to it:

    az group create --name ExampleGroup --location "South Central US"
    az deployment group create \
      --resource-group ExampleGroup \
      --template-file azuredeploy.bicep \
      --parameters storageAccountType=Standard_GRS
    
    New-AzResourceGroup -Name ExampleGroup -Location "Central US"
    New-AzResourceGroupDeployment `
      -DeploymentName ExampleDeployment `
      -ResourceGroupName ExampleGroup `
      -TemplateFile azuredeploy.bicep `
      -storageAccountType Standard_GRS
    

Next steps

Now that you've learned to deploy Bicep files from Cloud Shell, explore these related topics: