Member-only story

Terraform “SkuNotAvailable” Message

Jack Roper
2 min readDec 10, 2020

--

When trying to create a VM in Azure using Terraform I was receiving this error message:

Error: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=0 — Original Error: autorest/azure: Service returned an error. Status=<nil> Code=”SkuNotAvailable” Message=”The requested size for resource ‘/subscriptions/x/resourceGroups/x/providers/Microsoft.Compute/virtualMachines/x’ is currently not available in location ‘ukwest’ zones ‘’ for subscription ‘x’. Please try another size or deploy to a different location or zones. See https://aka.ms/azureskunotavailable for details.”

Turns out the Standard_D1_v2 SKU I was trying to create was not enabled for the subscription in the ukwest region, confirmed by running the following:

az vm list-skus — location ukwest — output tableResourceType Locations Name Zones Capabilities Restrictions
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
hostGroups/hosts ukwest DSv3-Type1 [‘vCPUs=64’, ‘vCPUsPerCore=2’] None
hostGroups/hosts ukwest ESv3-Type1 [‘vCPUs=64’, ‘vCPUsPerCore=2’] None
hostGroups/hosts ukwest FSv2-Type2 [‘vCPUs=72’, ‘vCPUsPerCore=2’] None
None

Running:

az vm list-skus — location uksouth — output table`

Showed that the SKU Standard_D1_v2 I wanted was available. Annoying as I then had to change…

--

--

Jack Roper
Jack Roper

Written by Jack Roper

A blog about DevOps & Cloud Tech. Specializing in Terraform, Kubernetes, GitHub, Azure & Azure DevOps! ☁️

No responses yet