Deployment limit in Azure Resource Group

Removing deployments with Powershell to solve the ‘DeploymentQuotaExceeded’ error in Azure.

Advertisements

For some time we have been using Visual Studio Team Services Release Manager for our continuous deployments to Azure. Today our Continuous Deployments to Azure Resource Manager came to a halt with the following error:

[error]DeploymentQuotaExceeded: Creating the deployment 'deployModule-0408-0956' would exceed the quota of '800'. The current deployment count is '800', please delete some deployments before creating a new one. Please see http://aka.ms/arm-deploy for usage details.

Unfortunately we had to find out what was going on, before we could do any new deployments. This was very time consuming, because there were only two google hits on the error. They where not very helpful in solving the error.

A resource group has max 800 deployments. We reached this limit. Now we had to remove some deployments before we could do a new deployment in the resource group. Unfortunately the reason why the deployments are kept is for auditing. When removing them, you will lose the auditing history.

Solution: removing deployments with powershell

With the Powershell command Get-AzureRmResourceGroupDeployment you can get the deployments in a resource group. And with the command Remove-AzureRmResourceGroupDeployment you can delete them. Deleting all Resource group deployments can be done with:

Get-AzureRmResourceGroupDeployment -ResourceGroupName MyResourceGroupName | Remove-AzureRmResourceGroupDeployment -Force

After removing some deployments we were able to proceed our continuous deployments.

1 thought on “Deployment limit in Azure Resource Group”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s