az-deployment
TLDR
Create a resource group deployment from a template
SYNOPSIS
az deployment scope subcommand [options]
DESCRIPTION
az deployment is a subcommand of the Azure CLI that manages Azure Resource Manager (ARM) deployments. It deploys infrastructure as code using ARM templates (JSON) or Bicep files to create and update Azure resources.
Deployments can target different scopes: resource group, subscription, management group, or tenant. The template defines resources to create, their properties, and dependencies. Parameters allow customization without modifying templates.
Deployment modes include incremental (add/update resources) and complete (remove resources not in template). What-if operations preview changes before deployment.
PARAMETERS
group create
Deploy at resource group scope.group validate
Validate template without deploying.group show
Show deployment details.group list
List deployments in a resource group.group delete
Remove deployment history entry.group what-if
Preview deployment changes.sub create
Deploy at subscription scope.mg create
Deploy at management group scope.tenant create
Deploy at tenant scope.--resource-group rg
Target resource group.--template-file file
Path to ARM template or Bicep file.--template-uri uri
URL to template file.--parameters params
Parameter values (file path or inline).--name name
Deployment name.--mode mode
Incremental or Complete.--location region
Required for subscription-scope deployments.--confirm-with-what-if
Show what-if and prompt before deploying.
CAVEATS
Complete mode deletes resources not in the template; use with caution. Deployment history is limited to 800 entries per resource group (auto-deleted oldest). Template file size limit is 4 MB. Nested templates require linked deployments or template specs for larger infrastructures. Bicep files are compiled to ARM JSON before deployment.
HISTORY
Azure Resource Manager templates launched in 2014 as Azure's infrastructure as code solution. The deployment commands evolved through several CLI versions. What-if preview functionality was added in 2020. Bicep, a domain-specific language that compiles to ARM templates, reached version 1.0 in May 2021 and has become the recommended authoring experience. Template specs for versioned, shareable templates were introduced in 2020.
SEE ALSO
az(1), az-group(1), az-bicep(1), az-resource(1)


