Skip to content
Latchkey

Terraform AzureRM provider "QuotaExceeded" / Sku capacity in CI

Azure returned QuotaExceeded: creating the VM or scale set would push the subscription past its regional vCPU (or SKU family) quota. The request is valid; the account is not entitled to that much capacity in the Region.

What this error means

terraform apply fails with Code="QuotaExceeded" Message="Operation could not be completed as it results in exceeding approved <Family> Cores quota."

Terraform
Error: creating Linux Virtual Machine: compute.VirtualMachinesClient#
CreateOrUpdate: ... Code="QuotaExceeded" Message="Operation could not be
completed as it results in exceeding approved standardDSv3Family Cores quota.
Current Limit: 10, Current Usage: 8, Additional Required: 4."

Common causes

The vCPU/SKU family quota is too low

The subscription's regional core quota for that VM family cannot accommodate the requested size.

Existing usage leaves no headroom

Other VMs already consume most of the quota, so even a small new VM tips it over.

How to fix it

Request a quota increase for the family

  1. Read the family and the limit/usage numbers from the message.
  2. Request a higher core quota for that family in the Region.
  3. Re-run apply once approved.
Terminal
az vm list-usage --location eastus \
  --query "[?contains(name.value, 'DSv3')]"

Pick a smaller size or different family

If a quota bump is slow, choose a VM size in a family that has available quota.

main.tf
size = "Standard_D2s_v5"

How to prevent it

  • Track core usage per VM family and Region.
  • Request quota before provisioning large fleets.
  • Choose families that already have headroom in the target Region.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →