Course contentsShow
← Cloud and Infrastructure
Lesson 902 of 2,98917. Azure ARM Templates and BicepFree lesson

Deploying Templates via Portal and CLI

Deploy ARM templates using Azure Portal, Azure CLI, and PowerShell commands.

Deploying Templates via Portal and CLI

What you'll learn: How to deploy ARM templates using Azure Portal, Azure CLI, and PowerShell to create and manage Azure resources.

The Core Idea

Now that you've built ARM templates (with resources, parameters, variables, and outputs), you need to actually deploy them to Azure. Think of this like having a blueprint for a house—you need a construction crew to turn it into reality. Azure gives you three main "crews": the Portal (point-and-click), Azure CLI (command-line for cross-platform), and PowerShell (command-line for Windows-centric workflows).

Deployment Methods

Azure Portal

The Portal offers a visual deployment experience. Navigate to "Deploy a custom template," paste or upload your JSON, fill in parameter values through forms, and click Deploy. This is great for learning and one-off deployments, but less ideal for automation.

Azure CLI

For cross-platform automation, use:

az deployment group create \
  --resource-group myResourceGroup \
  --template-file azuredeploy.json \
  --parameters azuredeploy.parameters.json

You specify the resource group, template file, and optionally a parameters file. Azure CLI works on Windows, Mac, and Linux.

Azure PowerShell

For Windows-native scripting:

New-AzResourceGroupDeployment `
  -ResourceGroupName myResourceGroup `
  -TemplateFile azuredeploy.json `
  -TemplateParameterFile azuredeploy.parameters.json

Both CLI methods support inline parameters, remote template URLs, and automation through CI/CD pipelines.

When to Use Each

Portal is best for learning and testing. CLI/PowerShell shine in DevOps pipelines, infrastructure automation, and repeatable deployments across environments.

Key Takeaway: ARM templates deploy via three primary methods—Portal for visual deployment, Azure CLI for cross-platform automation, and PowerShell for Windows-centric scripting—each suited to different workflows and automation needs.