-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Description
Hi,
I tried using infra code in here and I am facing below error. Let me know if fix is available.
Region = "eastus"
name = asvc-{random_value}
vnet ip ranges = 172.16.0.0/21
API version = 2025-04-01-preview, 2025-07-01-preview, 2025-06-01
aiservice.tf
resource "azapi_resource" "ai_foundry" {
type = "Microsoft.CognitiveServices/accounts@${local.api_version}"
name = "aisvc-${local.prefix}"
parent_id = azurerm_resource_group.main.id
location = azurerm_resource_group.main.location
schema_validation_enabled = false
body = {
kind = "AIServices"
sku = {
name = "S0"
}
identity = {
type = "SystemAssigned"
}
properties = {
disableLocalAuth = false
allowProjectManagement = true
customSubDomainName = "aisvc-${local.prefix}"
publicNetworkAccess = "Disabled"
networkAcls = {
defaultAction = "Allow"
}
networkInjections = [
{
scenario = "agent"
subnetArmId = azurerm_subnet.subnet_agent.id
useMicrosoftManagedNetwork = false
}
]
}
}
}
Error log
--------------------------------------------------------------------------------
│ RESPONSE 200: 200 OK
│ ERROR CODE: OperationError
│ --------------------------------------------------------------------------------
│ {
│ "id": "/subscriptions/<SUBSCRIPTION_ID>/providers/Microsoft.CognitiveServices/locations/eastus/operationResults/be941a5a-5c06-4e4e-bc43-b574029a9967",
│ "name": "be941a5a-5c06-4e4e-bc43-b574029a9967",
│ "status": "Failed",
│ "startTime": "2025-09-12T08:25:25Z",
│ "endTime": "2025-09-12T08:29:21Z",
│ "error": {
│ "code": "OperationError",
│ "message": "Failed to Create the resource. Provisioning state: Failed",
│ "details": [
│ {
│ "code": "ResourceProviderError",
│ "message": "Failed to create Aml RP virtual workspace due to System.Exception: Failed async operation {\n \"status\": \"Failed\",\n \"error\": {\n \"code\": \"InternalServerError\",\n \"message\": \"InternalServerError\"\n }\n}\n at Microsoft.CognitiveServices.ResourceProvider.AmlRp.AsyncOperationHelper.PollUntilCompleteAsync[T](TraceContext traceContext, HttpResponseMessage response, HttpClient httpClient, Int32 timeoutInMin, CancellationToken cancellationToken) in /__w/1/s/src/Common/ResourceProvider/AmlRp/AsyncOperationHelper.cs:line 117\n at Microsoft.CognitiveServices.ResourceProvider.AmlRp.AmlRpClient.PutAmlRpVirtualHubAsync(TraceContext traceContext, Dictionary`2 headers, ResourceIdentityInArm resourceIdentity, String primaryUserAssignedIdentity, String internalId, KeyVaultProperties keyVaultProperties, String subscriptionId, String resourceGroupName, String workspaceName, List`1 networkInjections, PublicNetworkAccessType publicNetworkAccessType, CancellationToken cancellationToken) in /__w/1/s/src/Common/ResourceProvider/AmlRp/AmlRpClient.cs:line 119\n at Microsoft.CognitiveServices.ResourceProvider.AmlRp.AmlRpService.PutAmlRpWorkspaceAsync(TraceContext traceContext, ResourceRequestContext requestContext, WorkerMessageRequestContext workerMessageRequestContext, IResourceEntity insertedResourceEntity, CancellationToken cancellationToken) in /__w/1/s/src/Common/ResourceProvider/AmlRp/AmlRpService.cs:line 124\n at Microsoft.CognitiveServices.ResourceProvider.Worker.MessageProcessor.ProcessInternalAsync(TraceContext traceContext, RpWorkerQueueMessage message, CancellationToken cancellationToken) in /__w/1/s/src/ResourceProvider/Rp.WorkerRole/AccountProvisioning/MessageProcessor.cs:line 223"
│ }
│ ]
│ }
│ }
│ --------------------------------------------------------------------------------
Metadata
Metadata
Assignees
Labels
No labels