Azure Quotas
Plan quota headroom early so deployments and scale events do not fail unexpectedly.
Identify bottlenecks before they become crises.
Use This Skill When
- The user sees quota or capacity errors in Azure (DeploymentQuotaExceeded, etc.)
- The user plans a new deployment in a constrained region or subscription
- The user needs preflight checks before scaling operations
- The user wants to verify available capacity before committing to architecture
Context: Quota Management Maturity
Immature: Hit quota limits unexpectedly, manual increases, no planning
Developing: Track some quotas, request increases reactively
Managed: Automated quota tracking, capacity planning, reserved capacity → Target
Optimized: Predictive quota management, auto-scaling to new regions, zero surprises
Required Inputs
- Subscription ID & region: Where are you deploying?
- Planned resources: How many VMs? App Services? SQL databases?
- Scale targets: Current vs. planned capacity?
- Timeline: Immediate (next week)? Next quarter? Next year?
- Compliance: Any data residency or region-specific needs?
Decision Tree
Where does this workload run?
├─ Single region (lowest complexity)
│ └─ Can fall back to alternative region if quota exceeded?
├─ Multi-region (higher complexity, but better resilience)
│ └─ Distribute across regions to avoid single-region limits
└─ Hybrid (on-premises + Azure)
└─ Plan data transfer, bandwidth quotas
What's the expected scale?
├─ Small (< 10 VMs, < 100 GB data)
│ └─ Quota rarely an issue
├─ Medium (10-100 VMs, 100 GB - 1 TB data)
│ └─ Plan quotas for compute tier
└─ Large (> 100 VMs, > 1 TB data)
└─ Request increases in advance, plan multi-region
Are quotas the risk, or SKU availability?
├─ Quota (limit per subscription) → Request increase
├─ SKU availability (no machines available) → Fallback to alternative SKU or region
└─ Cost (exceeding budget) → Use Reserved Instances to cap costs
Workflow
Phase 1: Identify Quota-Limited Services
Compute quotas (most common bottleneck):
# Check vCPU quotas by family
az vm list-usage --location "eastus" -o table
# Output
Name CurrentValue Limit
Standard D Family vCPUs 10 20 ← Can add 10 more
Standard B Family vCPUs 5 20 ← Plenty available
Standard E Family vCPUs 0 20 ← None used yet
Storage quotas:
# Get current storage account usage
az storage account list --query "[].{name:name, tier:sku.name, kind:kind}" -o table
# Limit: 250 storage accounts per subscription
# Each can be up to 5PB (petabytes)
Database quotas:
# SQL Server quota (per region, per subscription)
az sql server list --query "[].{name:name, region:location}" -o table
# Limit: 15 servers per subscription, per region
Networking quotas:
Network Security Groups: 100 per region
VNets: 100 per subscription
Public IPs: 60 per region
Load Balancers: 1 per region (basic), 100 (standard)
Application Gateways: 20 per subscription
Other quota-limited services:
App Service Plans: 100 per resource group
Batch Accounts: 1-3 per region
Cognitive Services: Varies by service (Speech, Vision, etc.)
Media Services: Limited slots per subscription
Redis Cache: 50 per subscription
Search Services: 15 per subscription
Phase 2: Check Current Usage vs. Limits
Get quota status:
# All quotas for a region
az provider show --namespace Microsoft.Compute \
--query "resourceTypes[?resourceType=='virtualMachines'].limits" -o table
# Output
limitName limitValue
vCpuCountPerRegion 20
vCpuCountPerVmFamily 20
standardBFamilyvCpusCount 20
standardDFamilyvCpusCount 20
Calculate usage:
# Count running VMs and vCPUs
az vm list --query "[] | length(@)" -o json → 8 VMs
az vm list --query "sum(hardwareProfile.vmSize)" → 24 vCPUs
# Available headroom
Quota: 20 vCPUs
Used: 24 vCPUs ← OVER QUOTA!
Available: -4 ← Must request increase
Regional availability:
# Check which regions have which SKUs available
az vm list-skus --location "eastus" --resource-type virtualMachines \
--query "[?name=='Standard_D4s_v3'].restrictions[].restrictionInfo" -o table
# If no restrictions shown, SKU available in that region
Phase 3: Request Quota Increases
Request vCPU increase (most common):
# Using Azure Portal or CLI
az provider register --namespace Microsoft.Capacity
# Submit request
az rest --method post \
--uri "https://management.azure.com/subscriptions/$SUBID/providers/Microsoft.Capacity/quotaRequests?api-version=2021-12-01" \
--body '{
"sku": { "name": "StandardDFamily" },
"properties": {
"quotaIncreaseAmount": 20
}
}'
Timeline for approval:
vCPU quota increases:
├─ Low demand regions (< 10 vCPU increase) → Auto-approved, 5 minutes
├─ Medium increase (10-50 vCPU) → Reviewed, 1-2 business days
├─ Large increase (> 50 vCPU) → Manual review, 3-5 business days
└─ Regional capacity issues → May be denied or partially approved
What if denied?
├─ Fallback to alternative SKU (larger memory, different vCPU count)
├─ Deploy to different region (check availability first)
├─ Use spot VMs (temporary, interruptible, no quota cost)
└─ Scale sequentially instead of all at once
Phase 4: Capacity Planning
Forecast future needs:
Current state (baseline):
├─ VMs: 5 × D4s_v3 (32 vCPUs)
├─ Target SLA: 99.9% uptime
└─ Growth: 20% year-over-year
Planned expansion (6 months):
├─ Add new customer segment: +8 VMs (64 vCPUs)
├─ High-availability zones: Need redundant instances
└─ Total needed: 96 vCPUs (3× current)
Recommendation:
└─ Request 120 vCPU quota now (headroom for spikes)
Design for quota resilience:
Option 1: Single region (simpler, quota-constrained)
├─ All VMs in eastus
├─ If quota exhausted, deployment fails
├─ RTO: Long (manual intervention needed)
Option 2: Multi-region (resilient, but complex)
├─ Primary: eastus (60% of VMs)
├─ Secondary: westus2 (40% of VMs)
├─ If eastus quota full, auto-failover to westus2
├─ RTO: Seconds (auto-failover)
Reserved capacity (guaranteed slots):
# Reserve vCPU capacity for 1-3 year term
# Cost: 30-50% savings vs. on-demand
# Benefit: Guaranteed availability, no quota issues
# Example: 96 vCPU (24 × D4s_v3 for 3 years)
Cost on-demand: ~$3,500/month = $126K/year
Cost reserved: ~$1,750/month (50% off) = $63K/year
Savings: $63K/year over 3 years
Phase 5: Pre-Deployment Validation
Quota checklist before major deployments:
Deployment: Production migration (100 VMs, 400 vCPUs)
✓ vCPU quota: 500 available, need 400 → OK
✓ Storage accounts: 10 used, limit 250 → OK
✓ SQL Servers: 2 used, limit 15 → OK
✓ App Service Plans: 8 used, limit 100 → OK
✓ Public IPs: 12 used, limit 60 → OK
✓ NSGs: 25 used, limit 100 → OK
✓ Regional availability: Standard_D4s_v3 in eastus → OK
✓ Fallback region: westus2 has same SKU available → OK
Status: GREEN - Ready to deploy
Quota monitoring during scale:
# Set alert for quota usage
az monitor metrics alert create \
--name "cpu-quota-warning" \
--resource-group $RG \
--scopes "/subscriptions/$SUBID" \
--condition "total ComputeQuotaUsage >= 80" \
--window-size "PT15M" \
--evaluation-frequency "PT5M" \
--actions email_action "ops@company.com"
Phase 6: Handle Quota Errors
Common errors & solutions:
Error: DeploymentQuotaExceeded
├─ Cause: vCPU quota exhausted
├─ Solution: Request increase or deploy to alternate region
Error: SkuNotAvailable
├─ Cause: SKU not available in chosen region
├─ Solution: Use different region, different SKU, or spot VMs
Error: ResourceQuotaExceeded (non-compute)
├─ Cause: Limit on databases, storage accounts, etc.
├─ Solution: Check specific service quotas, request if needed
Workarounds for immediate needs:
If quota exceeded AND request takes days:
Option 1: Use Spot VMs (low-cost, interruptible)
├─ Immediately available (no quota)
├─ 70-90% cost savings
├─ Risk: Can be evicted (5-30 min notice)
└─ Use for: Non-critical workloads, batch jobs, auto-scale
Option 2: Fallback to different region
├─ Check alternate region quota (often more available)
├─ Deploy there temporarily
├─ Risk: Higher latency, data residency may not apply
Option 3: Downsize temporary
├─ Use smaller VMs to fit current quota
├─ Scale up later when quota increase approved
├─ Risk: Performance impact during wait
Output Contract
Current Quota Status
- Quotas per service (compute, storage, database, networking)
- Current usage vs. limit
- Headroom available
Capacity Assessment
- Can planned workload fit in current quotas?
- What quotas need increases?
- Timeline for requests
Risk Analysis
- Single point of quota failure?
- Regional availability constraints?
- Fallback regions and their quotas?
Recommendations
- Increase requests (which, how much, when?)
- Architectural changes (multi-region, different SKU)?
- Reserved capacity (cost savings)?
Pre-Deployment Checklist
- All quotas sufficient? (Yes/No)
- Fallback strategy documented?
- Monitoring alerts configured?
Guardrails
- Always check quotas before major deployments: Don't discover limits mid-cutover.
- Request increases in advance: Lead time can be days; don't wait until needed.
- Verify SKU availability by region: Not all sizes available everywhere.
- Plan multi-region for resilience: Single-region is quota-constrained and brittle.
- Monitor quota usage: Set alerts at 70% to plan proactively.
- Document quota-critical paths: Identify which failures are quota-related vs. other issues.
- Test fallback regions: Ensure workload actually runs in alternate region before relying on it.
1---2name: azure-quotas3description: Assess and manage Azure service quotas and limits to prevent deployment and scaling failures. Use this skill when users ask about quota errors, capacity planning, regional availability, or resource limits.4---56# Azure Quotas78Plan quota headroom early so deployments and scale events do not fail unexpectedly.9Identify bottlenecks before they become crises.1011## Use This Skill When1213- The user sees quota or capacity errors in Azure (DeploymentQuotaExceeded, etc.)14- The user plans a new deployment in a constrained region or subscription15- The user needs preflight checks before scaling operations16- The user wants to verify available capacity before committing to architecture1718## Context: Quota Management Maturity1920**Immature**: Hit quota limits unexpectedly, manual increases, no planning 21**Developing**: Track some quotas, request increases reactively 22**Managed**: Automated quota tracking, capacity planning, reserved capacity → **Target** 23**Optimized**: Predictive quota management, auto-scaling to new regions, zero surprises2425## Required Inputs2627- **Subscription ID & region**: Where are you deploying?28- **Planned resources**: How many VMs? App Services? SQL databases?29- **Scale targets**: Current vs. planned capacity?30- **Timeline**: Immediate (next week)? Next quarter? Next year?31- **Compliance**: Any data residency or region-specific needs?3233## Decision Tree3435```36Where does this workload run?37├─ Single region (lowest complexity)38│ └─ Can fall back to alternative region if quota exceeded?39├─ Multi-region (higher complexity, but better resilience)40│ └─ Distribute across regions to avoid single-region limits41└─ Hybrid (on-premises + Azure)42 └─ Plan data transfer, bandwidth quotas4344What's the expected scale?45├─ Small (< 10 VMs, < 100 GB data)46│ └─ Quota rarely an issue47├─ Medium (10-100 VMs, 100 GB - 1 TB data)48│ └─ Plan quotas for compute tier49└─ Large (> 100 VMs, > 1 TB data)50 └─ Request increases in advance, plan multi-region5152Are quotas the risk, or SKU availability?53├─ Quota (limit per subscription) → Request increase54├─ SKU availability (no machines available) → Fallback to alternative SKU or region55└─ Cost (exceeding budget) → Use Reserved Instances to cap costs56```5758## Workflow5960### Phase 1: Identify Quota-Limited Services61621. **Compute quotas** (most common bottleneck):63 ```bash64 # Check vCPU quotas by family65 az vm list-usage --location "eastus" -o table66 67 # Output68 Name CurrentValue Limit69 Standard D Family vCPUs 10 20 ← Can add 10 more70 Standard B Family vCPUs 5 20 ← Plenty available71 Standard E Family vCPUs 0 20 ← None used yet72 ```73742. **Storage quotas**:75 ```bash76 # Get current storage account usage77 az storage account list --query "[].{name:name, tier:sku.name, kind:kind}" -o table78 79 # Limit: 250 storage accounts per subscription80 # Each can be up to 5PB (petabytes)81 ```82833. **Database quotas**:84 ```bash85 # SQL Server quota (per region, per subscription)86 az sql server list --query "[].{name:name, region:location}" -o table87 88 # Limit: 15 servers per subscription, per region89 ```90914. **Networking quotas**:92 ```93 Network Security Groups: 100 per region94 VNets: 100 per subscription95 Public IPs: 60 per region96 Load Balancers: 1 per region (basic), 100 (standard)97 Application Gateways: 20 per subscription98 ```991005. **Other quota-limited services**:101 ```102 App Service Plans: 100 per resource group103 Batch Accounts: 1-3 per region104 Cognitive Services: Varies by service (Speech, Vision, etc.)105 Media Services: Limited slots per subscription106 Redis Cache: 50 per subscription107 Search Services: 15 per subscription108 ```109110### Phase 2: Check Current Usage vs. Limits1111121. **Get quota status**:113 ```bash114 # All quotas for a region115 az provider show --namespace Microsoft.Compute \116 --query "resourceTypes[?resourceType=='virtualMachines'].limits" -o table117 118 # Output119 limitName limitValue120 vCpuCountPerRegion 20121 vCpuCountPerVmFamily 20122 standardBFamilyvCpusCount 20123 standardDFamilyvCpusCount 20124 ```1251262. **Calculate usage**:127 ```bash128 # Count running VMs and vCPUs129 az vm list --query "[] | length(@)" -o json → 8 VMs130 az vm list --query "sum(hardwareProfile.vmSize)" → 24 vCPUs131 132 # Available headroom133 Quota: 20 vCPUs134 Used: 24 vCPUs ← OVER QUOTA!135 Available: -4 ← Must request increase136 ```1371383. **Regional availability**:139 ```bash140 # Check which regions have which SKUs available141 az vm list-skus --location "eastus" --resource-type virtualMachines \142 --query "[?name=='Standard_D4s_v3'].restrictions[].restrictionInfo" -o table143 144 # If no restrictions shown, SKU available in that region145 ```146147### Phase 3: Request Quota Increases1481491. **Request vCPU increase** (most common):150 ```bash151 # Using Azure Portal or CLI152 az provider register --namespace Microsoft.Capacity153 154 # Submit request155 az rest --method post \156 --uri "https://management.azure.com/subscriptions/$SUBID/providers/Microsoft.Capacity/quotaRequests?api-version=2021-12-01" \157 --body '{158 "sku": { "name": "StandardDFamily" },159 "properties": {160 "quotaIncreaseAmount": 20161 }162 }'163 ```1641652. **Timeline for approval**:166 ```167 vCPU quota increases:168 ├─ Low demand regions (< 10 vCPU increase) → Auto-approved, 5 minutes169 ├─ Medium increase (10-50 vCPU) → Reviewed, 1-2 business days170 ├─ Large increase (> 50 vCPU) → Manual review, 3-5 business days171 └─ Regional capacity issues → May be denied or partially approved172 ```1731743. **What if denied?**175 ```176 ├─ Fallback to alternative SKU (larger memory, different vCPU count)177 ├─ Deploy to different region (check availability first)178 ├─ Use spot VMs (temporary, interruptible, no quota cost)179 └─ Scale sequentially instead of all at once180 ```181182### Phase 4: Capacity Planning1831841. **Forecast future needs**:185 ```186 Current state (baseline):187 ├─ VMs: 5 × D4s_v3 (32 vCPUs)188 ├─ Target SLA: 99.9% uptime189 └─ Growth: 20% year-over-year190 191 Planned expansion (6 months):192 ├─ Add new customer segment: +8 VMs (64 vCPUs)193 ├─ High-availability zones: Need redundant instances194 └─ Total needed: 96 vCPUs (3× current)195 196 Recommendation:197 └─ Request 120 vCPU quota now (headroom for spikes)198 ```1992002. **Design for quota resilience**:201 ```202 Option 1: Single region (simpler, quota-constrained)203 ├─ All VMs in eastus204 ├─ If quota exhausted, deployment fails205 ├─ RTO: Long (manual intervention needed)206 207 Option 2: Multi-region (resilient, but complex)208 ├─ Primary: eastus (60% of VMs)209 ├─ Secondary: westus2 (40% of VMs)210 ├─ If eastus quota full, auto-failover to westus2211 ├─ RTO: Seconds (auto-failover)212 ```2132143. **Reserved capacity** (guaranteed slots):215 ```bash216 # Reserve vCPU capacity for 1-3 year term217 # Cost: 30-50% savings vs. on-demand218 # Benefit: Guaranteed availability, no quota issues219 220 # Example: 96 vCPU (24 × D4s_v3 for 3 years)221 Cost on-demand: ~$3,500/month = $126K/year222 Cost reserved: ~$1,750/month (50% off) = $63K/year223 Savings: $63K/year over 3 years224 ```225226### Phase 5: Pre-Deployment Validation2272281. **Quota checklist before major deployments**:229 ```230 Deployment: Production migration (100 VMs, 400 vCPUs)231 232 ✓ vCPU quota: 500 available, need 400 → OK233 ✓ Storage accounts: 10 used, limit 250 → OK234 ✓ SQL Servers: 2 used, limit 15 → OK235 ✓ App Service Plans: 8 used, limit 100 → OK236 ✓ Public IPs: 12 used, limit 60 → OK237 ✓ NSGs: 25 used, limit 100 → OK238 239 ✓ Regional availability: Standard_D4s_v3 in eastus → OK240 ✓ Fallback region: westus2 has same SKU available → OK241 242 Status: GREEN - Ready to deploy243 ```2442452. **Quota monitoring during scale**:246 ```bash247 # Set alert for quota usage248 az monitor metrics alert create \249 --name "cpu-quota-warning" \250 --resource-group $RG \251 --scopes "/subscriptions/$SUBID" \252 --condition "total ComputeQuotaUsage >= 80" \253 --window-size "PT15M" \254 --evaluation-frequency "PT5M" \255 --actions email_action "ops@company.com"256 ```257258### Phase 6: Handle Quota Errors2592601. **Common errors & solutions**:261 ```262 Error: DeploymentQuotaExceeded263 ├─ Cause: vCPU quota exhausted264 ├─ Solution: Request increase or deploy to alternate region265 266 Error: SkuNotAvailable267 ├─ Cause: SKU not available in chosen region268 ├─ Solution: Use different region, different SKU, or spot VMs269 270 Error: ResourceQuotaExceeded (non-compute)271 ├─ Cause: Limit on databases, storage accounts, etc.272 ├─ Solution: Check specific service quotas, request if needed273 ```2742752. **Workarounds for immediate needs**:276 ```277 If quota exceeded AND request takes days:278 279 Option 1: Use Spot VMs (low-cost, interruptible)280 ├─ Immediately available (no quota)281 ├─ 70-90% cost savings282 ├─ Risk: Can be evicted (5-30 min notice)283 └─ Use for: Non-critical workloads, batch jobs, auto-scale284 285 Option 2: Fallback to different region286 ├─ Check alternate region quota (often more available)287 ├─ Deploy there temporarily288 ├─ Risk: Higher latency, data residency may not apply289 290 Option 3: Downsize temporary291 ├─ Use smaller VMs to fit current quota292 ├─ Scale up later when quota increase approved293 ├─ Risk: Performance impact during wait294 ```295296## Output Contract2972981. **Current Quota Status**299 - Quotas per service (compute, storage, database, networking)300 - Current usage vs. limit301 - Headroom available3023032. **Capacity Assessment**304 - Can planned workload fit in current quotas?305 - What quotas need increases?306 - Timeline for requests3073083. **Risk Analysis**309 - Single point of quota failure?310 - Regional availability constraints?311 - Fallback regions and their quotas?3123134. **Recommendations**314 - Increase requests (which, how much, when?)315 - Architectural changes (multi-region, different SKU)?316 - Reserved capacity (cost savings)?3173185. **Pre-Deployment Checklist**319 - All quotas sufficient? (Yes/No)320 - Fallback strategy documented?321 - Monitoring alerts configured?322323## Guardrails324325- **Always check quotas before major deployments**: Don't discover limits mid-cutover.326- **Request increases in advance**: Lead time can be days; don't wait until needed.327- **Verify SKU availability by region**: Not all sizes available everywhere.328- **Plan multi-region for resilience**: Single-region is quota-constrained and brittle.329- **Monitor quota usage**: Set alerts at 70% to plan proactively.330- **Document quota-critical paths**: Identify which failures are quota-related vs. other issues.331- **Test fallback regions**: Ensure workload actually runs in alternate region before relying on it.