Azure Quotas - Service Limits & Capacity Management skill

Check/manage Azure quotas and usage across providers.

by microsoft·MIT license·★ 1,532 Stars on the repo·GitHub ↗

Use now

Files of Azure Quotas - Service Limits & Capacity Management

microsoft/main1 file shown
SKILL.md
Show the full text277 lines

Azure Quotas - Service Limits & Capacity Management

AUTHORITATIVE GUIDANCE — Follow these instructions exactly for quota management and capacity validation.

Overview

What are Azure Quotas?

Azure quotas (also called service limits) are the maximum number of resources you can deploy in a subscription. Quotas:

  • Prevent accidental over-provisioning
  • Ensure fair resource distribution across Azure
  • Represent available capacity in each region
  • Can be increased (adjustable quotas) or are fixed (non-adjustable)

Key Concept: Quotas = Resource Availability

If you don't have quota, you cannot deploy resources. Always check quotas when planning deployments or selecting regions.

When to Use This Skill

Invoke this skill when:

  • Planning a new deployment - Validate capacity before deployment
  • Selecting an Azure region - Compare quota availability across regions
  • Troubleshooting quota exceeded errors - Check current usage vs limits
  • Requesting quota increases - Submit increase requests via CLI or Portal
  • Comparing regional capacity - Find regions with available quota
  • Validating provisioning limits - Ensure deployment won't exceed quotas

Quick Reference

Property Details
Primary Tool Azure CLI (az quota) - USE THIS FIRST, ALWAYS
Extension Required az extension add --name quota (MUST install first)
Key Commands az quota list, az quota show, az quota usage list, az quota usage show
Complete CLI Reference commands.md
Azure Portal My quotas - Use only as fallback
REST API Microsoft.Quota provider - Unreliable, do NOT use first
MCP Server azure-quota MCP server — NEVER use this. It is unreliable. Always use az quota CLI instead.
Required Permission Reader (view) or Quota Request Operator (manage)

⚠️ ALWAYS USE CLI FIRST

REST API and Portal can show misleading "No Limit" values — this does not mean unlimited capacity. It means the quota API doesn't support that resource type. Always start with az quota commands; fall back to Azure service limits docs if CLI returns BadRequest.

For complete CLI reference, see commands.md.

Quota Types

Type Adjustability Approval Examples
Adjustable Can increase via Portal/CLI/API Usually auto-approved VM vCPUs, Public IPs, Storage accounts
Non-adjustable Fixed limits Cannot be changed Subscription-wide hard limits

Important: Requesting quota increases is free. You only pay for resources you actually use, not for quota allocation.

Understanding Resource Name Mapping

⚠️ CRITICAL: There is NO 1:1 mapping between ARM resource types and quota resource names.

Example Mappings
ARM Resource Type Quota Resource Name
Microsoft.App/managedEnvironments ManagedEnvironmentCount
Microsoft.Compute/virtualMachines standardDSv3Family, cores, virtualMachines
Microsoft.Network/publicIPAddresses PublicIPAddresses, IPv4StandardSkuPublicIpAddresses
Discovery Workflow

Never assume the quota resource name from the ARM type. Always use this workflow:

  1. List all quotas for the resource provider:

    az quota list --scope /subscriptions/<id>/providers/<ProviderNamespace>/locations/<region>
    
  2. Match by localizedValue (human-readable description) to find the relevant quota

  3. Use the name field (not ARM resource type) in subsequent commands:

    az quota show --resource-name ManagedEnvironmentCount --scope ...
    az quota usage show --resource-name ManagedEnvironmentCount --scope ...
    

📖 Detailed mapping examples and workflow: See commands.md - Resource Name Mapping

Scripts

Pre-built scripts handle quota extension installation, usage queries, and capacity calculation. Use these instead of constructing commands manually. A single call returns limits, usage, and available capacity.

Script Purpose Usage
scripts/check-quota.ps1 Returns limit, usage, and available capacity for all quotas (or a single quota when resource name is provided) Primary script for quota checks
scripts/check-quota.sh Same as above (bash) Primary script for quota checks

Core Workflows

Workflow 1: Check Quota for a Specific Resource

Scenario: Verify quota limits and current usage before deployment

Run the script with the resource provider and region. It returns a table of all quotas with their limit, current usage, and available capacity in a single call:

.\scripts\check-quota.ps1 -ResourceProvider <provider> -Region <region>
./scripts/check-quota.sh <provider> <region>

To check a single resource, add the resource name:

.\scripts\check-quota.ps1 -ResourceProvider <provider> -Region <region> -ResourceName <resource-name>
./scripts/check-quota.sh <provider> <region> <resource-name>

Example:

.\scripts\check-quota.ps1 -ResourceProvider Microsoft.Compute -Region eastus

Example Output:

Resource Region Limit Usage Available
cores eastus 100 50 50
standardDSv3Family eastus 350 50 300
virtualMachines eastus 25000 5 24995
... ... ... ... ...

📖 See also: az quota show, az quota usage show

Workflow 2: Compare Quotas Across Regions

Scenario: Find the best region for deployment based on available capacity

# Define candidate regions
REGIONS=("eastus" "eastus2" "westus2" "centralus")
VM_FAMILY="standardDSv3Family"
SUBSCRIPTION_ID="<subscription-id>"

# Check quota availability across regions
for region in "${REGIONS[@]}"; do
  echo "=== Checking $region ==="
  
  # Get limit
  LIMIT=$(az quota show \
    --resource-name $VM_FAMILY \
    --scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region" \
    --query "properties.limit.value" -o tsv)
  
  # Get current usage
  USAGE=$(az quota usage show \
    --resource-name $VM_FAMILY \
    --scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region" \
    --query "properties.usages.value" -o tsv)
  
  # Calculate available
  AVAILABLE=$((LIMIT - USAGE))
  
  echo "Region: $region | Limit: $LIMIT | Usage: $USAGE | Available: $AVAILABLE"
done

📖 See also: commands.md for full scripted multi-region loop patterns

Workflow 3: Request Quota Increase

Scenario: Current quota is insufficient for deployment

# Request increase for VM quota
az quota update \
  --resource-name standardDSv3Family \
  --scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus \
  --limit-object value=500 \
  --resource-type dedicated

# Check request status
az quota request status list \
  --scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus

Approval Process:

  • Most adjustable quotas are auto-approved within minutes
  • Some requests require manual review (hours to days)
  • Non-adjustable quotas require Azure Support ticket

📖 See also: az quota update, az quota request status

Workflow 4: List All Quotas for Planning

Scenario: Understand all quotas for a resource provider in a region

# List all compute quotas in East US (table format)
az quota list \
  --scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus \
  --output table

# List all network quotas
az quota list \
  --scope /subscriptions/<subscription-id>/providers/Microsoft.Network/locations/eastus \
  --output table

# List all Container Apps quotas
az quota list \
  --scope /subscriptions/<subscription-id>/providers/Microsoft.App/locations/eastus \
  --output table

📖 See also: az quota list

Troubleshooting

Common Errors
Error Cause Solution
REST API "No Limit" Misleading — not unlimited Use CLI instead; see warning in Quick Reference
ExtensionNotFound Quota extension not installed az extension add --name quota
BadRequest Resource provider not supported by quota API Check service limits docs
MissingRegistration Microsoft.Quota provider not registered az provider register --namespace Microsoft.Quota
QuotaExceeded Deployment would exceed quota Request increase or choose different region
InvalidScope Incorrect scope format Use pattern: /subscriptions/<id>/providers/<namespace>/locations/<region>
CLI commands fail entirely Auth, extension, or environment issue Verify Azure CLI login (az account show), reinstall quota extension, check network. Do NOT use the azure-quota MCP server — it is unreliable.
Unsupported Resource Providers

Known unsupported providers:

Confirmed working providers:

  • ✅ Microsoft.Compute (VMs, disks, cores)
  • ✅ Microsoft.Network (VNets, IPs, load balancers)
  • ✅ Microsoft.App (Container Apps)
  • ✅ Microsoft.Storage (storage accounts)
  • ✅ Microsoft.MachineLearningServices (ML compute)

📖 See also: Troubleshooting Guide

Additional Resources

Resource Link
CLI Commands Reference commands.md - Complete syntax, parameters, examples
Azure Quotas Overview Microsoft Learn
Service Limits Documentation Azure subscription limits
Azure Portal - My Quotas Portal Link
Request Quota Increases How to request increases

Best Practices

  1. ✅ Always check quotas before deployment - Prevent quota exceeded errors
  2. ✅ Run az quota list first - Discover correct quota resource names
  3. ✅ Compare regions - Find regions with available capacity
  4. ✅ Account for growth - Request 20% buffer above immediate needs
  5. ✅ Use table output for overview - --output table for quick scanning
  6. ✅ Monitor usage trends - Set up alerts at 80% threshold (via Portal)
1---
2name: azure-quotas
3description: "Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: \"check quotas\", \"service limits\", \"current usage\", \"request quota increase\", \"quota exceeded\", \"validate capacity\", \"regional availability\", \"provisioning limits\", \"vCPU limit\", \"how many vCPUs available in my subscription\"."
4license: MIT
5metadata:
6 author: Microsoft
7 version: "1.2.1"
8---
9 
10 
11# Azure Quotas - Service Limits & Capacity Management
12 
13> **AUTHORITATIVE GUIDANCE** — Follow these instructions exactly for quota management and capacity validation.
14 
15## Overview
16 
17**What are Azure Quotas?**
18 
19Azure quotas (also called service limits) are the maximum number of resources you can deploy in a subscription. Quotas:
20- Prevent accidental over-provisioning
21- Ensure fair resource distribution across Azure
22- Represent **available capacity** in each region
23- Can be increased (adjustable quotas) or are fixed (non-adjustable)
24 
25**Key Concept:** **Quotas = Resource Availability**
26 
27If you don't have quota, you cannot deploy resources. Always check quotas when planning deployments or selecting regions.
28 
29## When to Use This Skill
30 
31Invoke this skill when:
32 
33- **Planning a new deployment** - Validate capacity before deployment
34- **Selecting an Azure region** - Compare quota availability across regions
35- **Troubleshooting quota exceeded errors** - Check current usage vs limits
36- **Requesting quota increases** - Submit increase requests via CLI or Portal
37- **Comparing regional capacity** - Find regions with available quota
38- **Validating provisioning limits** - Ensure deployment won't exceed quotas
39 
40## Quick Reference
41 
42| **Property** | **Details** |
43|--------------|-------------|
44| **Primary Tool** | Azure CLI (`az quota`) - **USE THIS FIRST, ALWAYS** |
45| **Extension Required** | `az extension add --name quota` (MUST install first) |
46| **Key Commands** | `az quota list`, `az quota show`, `az quota usage list`, `az quota usage show` |
47| **Complete CLI Reference** | [commands.md](./references/commands.md) |
48| **Azure Portal** | [My quotas](https://portal.azure.com/#blade/Microsoft_Azure_Capacity/QuotaMenuBlade/myQuotas) - Use only as fallback |
49| **REST API** | Microsoft.Quota provider - **Unreliable, do NOT use first** |
50| **MCP Server** | `azure-quota` MCP server — **NEVER use this. It is unreliable. Always use `az quota` CLI instead.** |
51| **Required Permission** | Reader (view) or Quota Request Operator (manage) |
52 
53> **⚠️ ALWAYS USE CLI FIRST**
54>
55> REST API and Portal can show misleading "No Limit" values — this does **not** mean unlimited capacity. It means the quota API doesn't support that resource type. Always start with `az quota` commands; fall back to [Azure service limits docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits) if CLI returns `BadRequest`.
56>
57> For complete CLI reference, see [commands.md](./references/commands.md).
58 
59## Quota Types
60 
61| **Type** | **Adjustability** | **Approval** | **Examples** |
62|----------|-------------------|--------------|--------------|
63| **Adjustable** | Can increase via Portal/CLI/API | Usually auto-approved | VM vCPUs, Public IPs, Storage accounts |
64| **Non-adjustable** | Fixed limits | Cannot be changed | Subscription-wide hard limits |
65 
66**Important:** Requesting quota increases is **free**. You only pay for resources you actually use, not for quota allocation.
67 
68## Understanding Resource Name Mapping
69 
70**⚠️ CRITICAL:** There is **NO 1:1 mapping** between ARM resource types and quota resource names.
71 
72### Example Mappings
73 
74| ARM Resource Type | Quota Resource Name |
75|-------------------|---------------------|
76| `Microsoft.App/managedEnvironments` | `ManagedEnvironmentCount` |
77| `Microsoft.Compute/virtualMachines` | `standardDSv3Family`, `cores`, `virtualMachines` |
78| `Microsoft.Network/publicIPAddresses` | `PublicIPAddresses`, `IPv4StandardSkuPublicIpAddresses` |
79 
80### Discovery Workflow
81 
82**Never assume the quota resource name from the ARM type.** Always use this workflow:
83 
841. **List all quotas** for the resource provider:
85 ```bash
86 az quota list --scope /subscriptions/<id>/providers/<ProviderNamespace>/locations/<region>
87 ```
88 
892. **Match by `localizedValue`** (human-readable description) to find the relevant quota
90 
913. **Use the `name` field** (not ARM resource type) in subsequent commands:
92 ```bash
93 az quota show --resource-name ManagedEnvironmentCount --scope ...
94 az quota usage show --resource-name ManagedEnvironmentCount --scope ...
95 ```
96 
97> **📖 Detailed mapping examples and workflow:** See [commands.md - Resource Name Mapping](./references/commands.md#resource-name-mapping)
98 
99## Scripts
100 
101Pre-built scripts handle quota extension installation, usage queries, and capacity calculation. Use these instead of constructing commands manually. A single call returns limits, usage, and available capacity.
102 
103| Script | Purpose | Usage |
104|--------|---------|-------|
105| `scripts/check-quota.ps1` | Returns limit, usage, and available capacity for all quotas (or a single quota when resource name is provided) | Primary script for quota checks |
106| `scripts/check-quota.sh` | Same as above (bash) | Primary script for quota checks |
107 
108## Core Workflows
109 
110### Workflow 1: Check Quota for a Specific Resource
111 
112**Scenario:** Verify quota limits and current usage before deployment
113 
114Run the script with the resource provider and region. It returns a table of **all** quotas with their limit, current usage, and available capacity in a single call:
115 
116```powershell
117.\scripts\check-quota.ps1 -ResourceProvider <provider> -Region <region>
118```
119```bash
120./scripts/check-quota.sh <provider> <region>
121```
122 
123To check a single resource, add the resource name:
124 
125```powershell
126.\scripts\check-quota.ps1 -ResourceProvider <provider> -Region <region> -ResourceName <resource-name>
127```
128```bash
129./scripts/check-quota.sh <provider> <region> <resource-name>
130```
131 
132**Example:**
133 
134```powershell
135.\scripts\check-quota.ps1 -ResourceProvider Microsoft.Compute -Region eastus
136```
137 
138**Example Output:**
139 
140| Resource | Region | Limit | Usage | Available |
141|----------|--------|-------|-------|-----------|
142| cores | eastus | 100 | 50 | 50 |
143| standardDSv3Family | eastus | 350 | 50 | 300 |
144| virtualMachines | eastus | 25000 | 5 | 24995 |
145| ... | ... | ... | ... | ... |
146 
147> **📖 See also:** [az quota show](./references/commands.md#az-quota-show), [az quota usage show](./references/commands.md#az-quota-usage-show)
148 
149### Workflow 2: Compare Quotas Across Regions
150 
151**Scenario:** Find the best region for deployment based on available capacity
152 
153```bash
154# Define candidate regions
155REGIONS=("eastus" "eastus2" "westus2" "centralus")
156VM_FAMILY="standardDSv3Family"
157SUBSCRIPTION_ID="<subscription-id>"
158 
159# Check quota availability across regions
160for region in "${REGIONS[@]}"; do
161 echo "=== Checking $region ==="
162 
163 # Get limit
164 LIMIT=$(az quota show \
165 --resource-name $VM_FAMILY \
166 --scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region" \
167 --query "properties.limit.value" -o tsv)
168 
169 # Get current usage
170 USAGE=$(az quota usage show \
171 --resource-name $VM_FAMILY \
172 --scope "/subscriptions/$SUBSCRIPTION_ID/providers/Microsoft.Compute/locations/$region" \
173 --query "properties.usages.value" -o tsv)
174 
175 # Calculate available
176 AVAILABLE=$((LIMIT - USAGE))
177 
178 echo "Region: $region | Limit: $LIMIT | Usage: $USAGE | Available: $AVAILABLE"
179done
180```
181 
182> **📖 See also:** [commands.md](./references/commands.md#az-quota-show) for full scripted multi-region loop patterns
183 
184### Workflow 3: Request Quota Increase
185 
186**Scenario:** Current quota is insufficient for deployment
187 
188```bash
189# Request increase for VM quota
190az quota update \
191 --resource-name standardDSv3Family \
192 --scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus \
193 --limit-object value=500 \
194 --resource-type dedicated
195 
196# Check request status
197az quota request status list \
198 --scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus
199```
200 
201**Approval Process:**
202- Most adjustable quotas are auto-approved within minutes
203- Some requests require manual review (hours to days)
204- Non-adjustable quotas require Azure Support ticket
205 
206> **📖 See also:** [az quota update](./references/commands.md#az-quota-update), [az quota request status](./references/advanced-commands.md#az-quota-request-status-list)
207 
208### Workflow 4: List All Quotas for Planning
209 
210**Scenario:** Understand all quotas for a resource provider in a region
211 
212```bash
213# List all compute quotas in East US (table format)
214az quota list \
215 --scope /subscriptions/<subscription-id>/providers/Microsoft.Compute/locations/eastus \
216 --output table
217 
218# List all network quotas
219az quota list \
220 --scope /subscriptions/<subscription-id>/providers/Microsoft.Network/locations/eastus \
221 --output table
222 
223# List all Container Apps quotas
224az quota list \
225 --scope /subscriptions/<subscription-id>/providers/Microsoft.App/locations/eastus \
226 --output table
227```
228 
229> **📖 See also:** [az quota list](./references/commands.md#az-quota-list)
230 
231## Troubleshooting
232 
233### Common Errors
234 
235| **Error** | **Cause** | **Solution** |
236|-----------|-----------|--------------|
237| REST API "No Limit" | Misleading — not unlimited | Use CLI instead; see warning in Quick Reference |
238| `ExtensionNotFound` | Quota extension not installed | `az extension add --name quota` |
239| `BadRequest` | Resource provider not supported by quota API | Check [service limits docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits) |
240| `MissingRegistration` | Microsoft.Quota provider not registered | `az provider register --namespace Microsoft.Quota` |
241| `QuotaExceeded` | Deployment would exceed quota | Request increase or choose different region |
242| `InvalidScope` | Incorrect scope format | Use pattern: `/subscriptions/<id>/providers/<namespace>/locations/<region>` |
243| CLI commands fail entirely | Auth, extension, or environment issue | Verify Azure CLI login (`az account show`), reinstall quota extension, check network. Do NOT use the `azure-quota` MCP server — it is unreliable. |
244 
245### Unsupported Resource Providers
246 
247**Known unsupported providers:**
248- ❌ Microsoft.DocumentDB (Cosmos DB) - Use Portal or [Cosmos DB limits docs](https://learn.microsoft.com/en-us/azure/cosmos-db/concepts-limits)
249 
250**Confirmed working providers:**
251- ✅ Microsoft.Compute (VMs, disks, cores)
252- ✅ Microsoft.Network (VNets, IPs, load balancers)
253- ✅ Microsoft.App (Container Apps)
254- ✅ Microsoft.Storage (storage accounts)
255- ✅ Microsoft.MachineLearningServices (ML compute)
256 
257> **📖 See also:** [Troubleshooting Guide](./references/commands.md#troubleshooting)
258 
259## Additional Resources
260 
261| Resource | Link |
262|----------|------|
263| **CLI Commands Reference** | [commands.md](./references/commands.md) - Complete syntax, parameters, examples |
264| **Azure Quotas Overview** | [Microsoft Learn](https://learn.microsoft.com/en-us/azure/quotas/quotas-overview) |
265| **Service Limits Documentation** | [Azure subscription limits](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits) |
266| **Azure Portal - My Quotas** | [Portal Link](https://portal.azure.com/#blade/Microsoft_Azure_Capacity/QuotaMenuBlade/myQuotas) |
267| **Request Quota Increases** | [How to request increases](https://learn.microsoft.com/en-us/azure/quotas/quickstart-increase-quota-portal) |
268 
269## Best Practices
270 
2711. ✅ **Always check quotas before deployment** - Prevent quota exceeded errors
2722. ✅ **Run `az quota list` first** - Discover correct quota resource names
2733. ✅ **Compare regions** - Find regions with available capacity
2744. ✅ **Account for growth** - Request 20% buffer above immediate needs
2755. ✅ **Use table output for overview** - `--output table` for quick scanning
2766. ✅ **Monitor usage trends** - Set up alerts at 80% threshold (via Portal)
277 

Discussion

Alternatives

Azure app onboardEnd-to-end orchestrator: from a business idea, app idea, or existing app to running Azure deployment with cost estimates and pre-deploy approval. Analyzes your app, auto-detects the right Azure services, scaffolds infrastructure code, and deploys — tailored to your app, not a template. Handles moving existing apps to Azure without rewriting or with minimal changes. WHEN: bring your app to Azure, plan my app, cost to run, is my code ready to deploy, deploy my app to the cloud, deploy all my services, what Azure services do I need, plan my Azure deployment, deploy my new app to Azure, one-click deploy, I have an app and want it on Azure, migrate my app to Azure, help me get started, build an app, no code yet, starter project. DO NOT USE FOR: use azd for deployment(use azure-deploy), optimizing existing costs (use cost-optimization), code readiness checks only (use azure-app-onboard-prereq).Infrastructure & ops · MITAzure App Onboard Prereq — Repository EvaluationAssess whether source code is ready to deploy to Azure — the check BEFORE infrastructure work. Evaluates build health, app completeness, dependencies and local services, stack compatibility, and deployment feasibility. Answers questions about what your app needs before it can be deployed — frameworks, dependencies, and configuration. Checks whether dependencies are compatible and identifies deployment blockers and unsupported frameworks. WHEN: "evaluate my repo", "is my app ready to deploy", "what does my app need to deploy", "what do I need before deploying", "does my app need", "can I ship this to Azure", "scan my repo for issues", "is this app deployable", "check if my app is ready for Azure", "do I need a Dockerfile", "what's blocking my deployment", "are there any blockers", "are my dependencies compatible", "does Azure support my framework", "what needs to change before deploying", "check my app configuration".Infrastructure & ops · MITDocker MCP gatewayDocker's own CLI plugin: run any server from the Docker MCP Catalog in its own container, behind one connection, with secrets kept out of env vars.Coding · MITAzure cloud migrateAssess and migrate cross-cloud workloads to Azure with reports and code conversion. Supports Lambda→Functions, Beanstalk/Heroku/App Engine→App Service, Fargate/Kubernetes/Cloud Run/Spring Boot→Container Apps. WHEN: migrate Lambda to Functions, AWS to Azure, migrate Beanstalk, migrate Heroku, migrate App Engine, Cloud Run migration, Fargate to ACA, ECS/Kubernetes/GKE/EKS to Container Apps, Spring Boot to Container Apps, cross-cloud migration.Infrastructure & ops · MIT