Azure / Azure/terraform-provider-azapi

Creating AML Workspace outputs error: MissingApiVersionParameter

Open
#834 1 comment 0 reactions 0 assignees View on GitHub
triaged upstream-api
Dominant language
Go
Stars
244
Forks
97
Avg merge
5d 9h
Merged PRs (30d)
9

Description

This is my azapi_resource to create a MLW Workspace

```
resource "azapi_resource" "aml_workspace" {
type = "Microsoft.MachineLearningServices/workspaces@2024-10-01-preview"
name = local.mlw_name
identity {
type = "UserAssigned"
identity_ids = [azurerm_user_assigned_identity.mlw.id]
}
location = azurerm_resource_group.spoke.location
parent_id = azurerm_resource_group.spoke.id
tags = local.tags

body = {
sku = {
name = var.mlw_sku
tier = var.mlw_sku
}
properties = {
applicationInsights = module.hub.azurerm_application_insights_id
keyVault = azurerm_key_vault.keyvault.id
storageAccount = azurerm_storage_account.mlw.id
containerRegistry = module.hub.azurerm_container_registry_id
publicNetworkAccess = "Disabled"
primaryUserAssignedIdentity = azurerm_user_assigned_identity.mlw.id
managedNetwork = {
isolationMode = "AllowInternetOutbound"
}
provisionNetworkNow = true
friendlyName = local.mlw_name
description = "AML Workspace with AML-provisioned Managed Network"
hbiWorkspace = false
v1LegacyMode = false
}
}

depends_on = [
azurerm_storage_account.mlw,
azurerm_key_vault_access_policy.mlw,
azurerm_role_assignment.key_vault_contributor,
azurerm_role_assignment.reader,
module.hub,
azurerm_user_assigned_identity.mlw
]
}
```

I get this error when running it:
```
│ Error: Failed to create/update resource

│ with azapi_resource.aml_workspace,
│ on az_api_mlw.tf line 1, in resource "azapi_resource" "aml_workspace":
│ 1: resource "azapi_resource" "aml_workspace" {

│ creating/updating Resource: (ResourceId
│ "/subscriptions/xxxxxxxxx/resourceGroups/mlweun-dev-0001-rg/providers/Microsoft.MachineLearningServices/workspaces/mlweundev0001mlw"
│ / Api Version "2025-01-01-preview"): GET
│ https://management.azure.com/subscriptions/xxxxxxxxxx/providers/Microsoft.MachineLearningServices/locations/northeurope/workspaceOperationsStatus/OwFUePUtfBCk4u1xmPxvbXQXtsjECMph28S4KGIpXGM
│ --------------------------------------------------------------------------------
│ RESPONSE 200: 200 OK
│ ERROR CODE: InternalServerError
│ --------------------------------------------------------------------------------
│ {
│ "status": "Failed",
│ "error": {
│ "code": "InternalServerError",
│ "message": "Received 400 from a service request"
│ }
│ }
│ --------------------------------------------------------------------------------

```
The link in the error log reads as
```
{
"error": {
"code": "MissingApiVersionParameter",
"message": "The api-version query parameter (?api-version=) is required for all requests."
}
}
```

Any help with this would be appreciated

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure from az_api_mlw.tf with the azapi_resource.aml_workspace configuration and inspect the workspaceOperationsStatus request shown in the error, especially the missing api-version query parameter. Done means the AML workspace creation completes without the MissingApiVersionParameter error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, terraform
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.