Azure CLI Deploy Recipe
Deploy to Azure using Azure CLI.
Prerequisites
azCLI installed → Runmcp_azure_mcp_extension_cli_installwithcli-type: azif needed.azure/deployment-plan.mdexists with statusValidated- Bicep/ARM templates exist in
infra/ - Subscription and location confirmed → See Pre-Deploy Checklist
Workflow
| Step | Task | Command |
|---|---|---|
| 1 | Pre-deploy checklist | Confirm subscription/location with user |
| 2 | Deploy infrastructure | az deployment sub create |
| 3 | Deploy application | Service-specific commands |
| 4 | Verify | az resource list |
| 5 | Report | Present deployed endpoint URLs to the user — see Verification |
Infrastructure Deployment
Subscription-Level (Recommended)
az deployment sub create \
--location eastus2 \
--template-file ./infra/main.bicep \
--parameters environmentName=devResource Group Level
az group create --name rg-myapp-dev --location eastus2
az deployment group create \
--resource-group rg-myapp-dev \
--template-file ./infra/main.bicep \
--parameters environmentName=devApplication Deployment
Container Apps
az containerapp update \
--name <app-name> \
--resource-group <rg-name> \
--image <acr-name>.azurecr.io/myapp:latestApp Service
az webapp deploy \
--name <app-name> \
--resource-group <rg-name> \
--src-path ./publish.zipAzure Functions
func azure functionapp publish <function-app-name>