Training
Module
Manage resource lifecycles with deployment stacks - Training
Understand how deployment stacks manage resources on your behalf, and how resources change as stacks are deployed, updated, and removed.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Each resource group is limited to 800 deployments in its deployment history. This article describes the error you receive when a deployment fails because it would exceed the allowed 800 deployments. To resolve this error, delete deployments from the resource group history. Deleting a deployment from the history doesn't affect any of the resources that were deployed.
Azure Resource Manager automatically deletes deployments from your history as you near the limit. You may still see this error for one of the following reasons:
For information about how to remove a lock or opt in to automatic deletions, see Automatic deletions from deployment history.
This article describes how to manually delete deployments from the history.
During deployment, you receive an error that states the current deployment will exceed the quota of 800 deployments.
Use the az deployment group delete command to delete deployments from the history.
az deployment group delete --resource-group exampleGroup --name deploymentName
To delete all deployments older than five days, use:
startdate=$(date +%F -d "-5days")
deployments=$(az deployment group list --resource-group exampleGroup --query "[?properties.timestamp<'$startdate'].name" --output tsv)
for deployment in $deployments
do
az deployment group delete --resource-group exampleGroup --name $deployment
done
You can get the current count in the deployment history with the following command. This example requires a Bash environment.
az deployment group list --resource-group exampleGroup --query "length(@)"
Training
Module
Manage resource lifecycles with deployment stacks - Training
Understand how deployment stacks manage resources on your behalf, and how resources change as stacks are deployed, updated, and removed.
Documentation
Deployment history deletions - Azure Resource Manager
Describes how Azure Resource Manager automatically deletes deployments from the deployment history. Deployments are deleted when the history is close to exceeding the limit of 800.
Deployment history - Azure Resource Manager
Describes how to view Azure Resource Manager deployment operations with the portal, PowerShell, Azure CLI, and REST API.
Enable debug logging - Azure Resource Manager
Describes how to enable debug logging to troubleshoot Azure resources deployed with Bicep files or Azure Resource Manager templates (ARM templates).
Troubleshoot ARM template JSON deployments - Azure Resource Manager
Learn how to troubleshoot Azure Resource Manager template (ARM template) JSON deployments.