AZURE
QuotaExceeded - Quota Exceeded: Resource Limit Reached
You've hit Azure's hard quota limit for this resource type—the operation would push you over the subscription or regional cap. This 403 client-side error means ARM checked your current usage against the limit and blocked the operation. Quota limits vary by subscription tier and resource type (regional quotas differ from subscription-wide quotas). Most common with VM vCPU limits, but also appears with AKS cluster/node quotas, Azure SQL database instance limits, and App Service plan quotas. ARM enforces these before resource creation.
#Common Causes
- →Regional Quota Limit: Creating the resource in the specified region would push you over the regional quota for that resource type. VM cores have regional quotas that differ by subscription tier. Quota limits vary by resource type and subscription type.
- →Subscription-Level Quota: The total count of this resource type across all regions exceeds your subscription quota. Some resources have subscription-wide quotas in addition to regional quotas. The error response indicates which quota was exceeded.
- →Resource Group Quota: The resource group contains the maximum allowed number of resources of this type. Resource group quotas vary by resource type and are less common than regional or subscription quotas.
✓Solutions
- 1Step 1: Diagnose - Check VM quota usage in the region: az vm list-usage --location <region> --query "[?name.value=='cores'].{current:currentValue, limit:limit}" --output table
- 2Step 2: Diagnose - Check all quota usage in the region: az vm list-usage --location <region> --output table
- 3Step 3: Diagnose - Find unused resources that can be deleted: az resource list --query "[?tags.Environment==null].{id:id, name:name, type:type}" --output table
- 4Step 4: Fix - Delete unused resources to free up quota. Adjust the query based on your tagging strategy.
- 5Step 5: Fix - Request quota increase through Azure Portal: Subscription > Usage + quotas, find the exceeded quota, click "Request increase", and fill out the support request. Approval typically takes 1-2 business days.
- 6Step 6: Fix - Use a different region where you haven't hit the quota. Create the resource in a region where your quota usage is below the limit.
- 7Step 7: Verify - Re-check quota usage after fixes: az vm list-usage --location <region> --output table
- 8Step 8: Verify - Retry your resource creation. It should succeed with HTTP 201 instead of 403 QuotaExceeded.
</>Code Examples
Quota Usage Diagnosis and Management
1# This script helps diagnose QuotaExceeded errors by checking quota usage
2
3# Step 1: Set your region (replace with your target region)
4REGION="eastus"
5echo "Checking quota usage for region: $REGION"
6
7# Step 2: Check VM quota usage (cores)
8echo "Checking VM core quota usage..."
9az vm list-usage --location $REGION --query "[?name.value=='cores'].{name:name.value, current:currentValue, limit:limit}" --output table
10
11# Step 3: Check all VM quota usage
12echo "Checking all VM quota usage..."
13az vm list-usage --location $REGION --output table
14
15# Step 4: Check if quota is exceeded
16CURRENT=$(az vm list-usage --location $REGION --query "[?name.value=='cores'].currentValue" -o tsv)
17LIMIT=$(az vm list-usage --location $REGION --query "[?name.value=='cores'].limit" -o tsv)
18echo "Current usage: $CURRENT"
19echo "Quota limit: $LIMIT"
20
21if [ ! -z "$CURRENT" ] && [ ! -z "$LIMIT" ]; then
22 if [ $CURRENT -ge $LIMIT ]; then
23 echo "WARNING: Quota limit reached or exceeded"
24 echo "Current: $CURRENT, Limit: $LIMIT"
25 else
26 REMAINING=$((LIMIT - CURRENT))
27 echo "Quota remaining: $REMAINING"
28 fi
29fi
30
31# Step 5: Find unused resources that can be deleted (example: resources without Environment tag)
32echo "Finding potentially unused resources..."
33az resource list --query "[?tags.Environment==null].{id:id, name:name, type:type, location:location}" --output table
34
35# Step 6: List all resource groups to identify candidates for cleanup
36echo "Listing all resource groups..."
37az group list --query "[].{name:name, location:location}" --output table
38
39# Step 7: Check quota in alternative regions
40echo "Checking quota in alternative regions..."
41ALTERNATIVE_REGIONS=("westus2" "centralus" "westeurope")
42for alt_region in "${ALTERNATIVE_REGIONS[@]}"; do
43 echo "Checking quota in $alt_region..."
44 az vm list-usage --location $alt_region --query "[?name.value=='cores'].{region:location, current:currentValue, limit:limit}" --output table
45done
46
47# Step 8: Instructions for requesting quota increase
48echo ""
49echo "To request quota increase:"
50echo " 1. Go to Azure Portal > Subscription > Usage + quotas"
51echo " 2. Find the exceeded quota"
52echo " 3. Click 'Request increase'"
53echo " 4. Fill out the support request"
54echo " 5. Approval typically takes 1-2 business days"↗Related Errors
Provider Information
This error code is specific to AZURE services. For more information, refer to the official AZURE documentation.