0

I am deploying from terraform the azurerm_cognitive_account resource in OpenAI mode.

I have set the smallest machine size 'SKU' (F0, F1, S0 and S1) and they all give me the quota error.

cognitiveservicesaccounts.CognitiveServicesAccountsClient#AccountsCreate: Failure sending request: StatusCode=0 -- Original Error: Code="SpecialFeatureOrQuotaIdRequired" Message="The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI'

The SPN has permissions in Contributor throughout the RG and deploys many other resources.

I have also tried to deploy from the azure portal the OpenAI and it does not give me error, it lets me with any SKU.

The terraform version is the latest one.

Jahnavi
  • 3,076
  • 1
  • 3
  • 10
Kike
  • 15
  • 4

1 Answers1

2

The subscription exceeds the required quota for the SKU like 'S0' from the type OpenAI. You can request an increase in quota for the required feature or quota ID.

Go to the Azure portal -> OpenAI service resource for which you want to increase the request limit, and submit a quota increase support request. I would recommend you try with an alternative SKU that does not require the same limit or feature ID.

But,

At this time, due to overwhelming demand we cannot accept any new resource or quota increase requests as detailed in MSDoc.

As mentioned in the above MS Doc, you can create only 3 resources per region in OpenAI.

I already have three resources in my environment for the East Us region. That is why it displays the prompt shown below.

enter image description here

Then I changed the region from EastUS to Southcentral US, and it started working and the prompt vanished.

enter image description here

So, try shifting to a different region.

Note: You can even create another open AI service in a different location and separate the workload before deployments.

After these changes, I tried to deploy the same in my environment by taking a reference template from terraform registry and was able to complete it successfully in another region with the same SKU.

data "azurerm_resource_group" "main" {
  name     = "Jahnavi"
  location = "SouthCentral US"
}

resource "azurerm_cognitive_account" "example" {
  name                = "xxxx"
  location            = data.azurerm_resource_group.main.location
  resource_group_name = data.azurerm_resource_group.main.name
  kind                = "Face"
  sku_name = "S0"
}

Output:

enter image description here

Deployment succeeded:

enter image description here

Jahnavi
  • 3,076
  • 1
  • 3
  • 10