A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-cloud-shell below:

Deploy templates with Cloud Shell - Azure Resource Manager

You can use Azure Cloud Shell to deploy an Azure Resource Manager template (ARM template). You can deploy either an ARM template that is stored remotely, or an ARM template that is stored on the local storage account for Cloud Shell.

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

Prerequisites Required permissions

To deploy a Bicep file or ARM template, you need write access on the resources you're deploying and access to all operations on the Microsoft.Resources/deployments resource type. For example, to deploy a virtual machine, you need Microsoft.Compute/virtualMachines/write and Microsoft.Resources/deployments/* permissions. The what-if operation has the same permission requirements.

For a list of roles and permissions, see Azure built-in roles.

Deploy remote template

To deploy an external template, provide the URI of the template exactly as you would for any external deployment. The external template could be in a GitHub repository or and an external storage account.

  1. Open the Cloud Shell prompt by selecting the cloud shell icon from the Azure portal.

  2. Toggle between Bash and PowerShell by selecting Switch to Bash or Switch to PowerShell.

  3. To deploy the template, use the following commands:

    az group create --name ExampleGroup --location "Central US"
    az deployment group create \
      --name ExampleDeployment \
      --resource-group ExampleGroup \
      --template-uri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.storage/storage-account-create/azuredeploy.json" \
      --parameters storageAccountType=Standard_GRS
    
    New-AzResourceGroup -Name ExampleGroup -Location "Central US"
    New-AzResourceGroupDeployment `
      -DeploymentName ExampleDeployment `
      -ResourceGroupName ExampleGroup `
      -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.storage/storage-account-create/azuredeploy.json `
      -storageAccountType Standard_GRS
    
Deploy local template

To deploy a local template, you must first upload your template to the storage account that is connected to your Cloud Shell session.

  1. Sign in to the Cloud Shell.

  2. Select either PowerShell or Bash.

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

  4. Select the ARM template you want to upload, and then select Open.

  5. To deploy the template, use the following commands:

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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4