由于区域不正确,Azure 机器学习工作区的 Bicep 部署失败

问题描述 投票:0回答:1

我目前正在编写一个用于部署机器学习工作区的二头肌模板。我遇到了一个奇怪的问题,由于位置不正确而拒绝部署:

{"error":{"code":"LocationNotAvailableForResourceType","message":"The provided location 'northeurope' is not available for resource type 'Microsoft.MachineLearning/Workspaces'. List of available regions for the resource type is 'southcentralus,westeurope,southeastasia,japaneast,westcentralus'."}}

我的部署代码如下所示:

resource MLWorkspace 'Microsoft.MachineLearningServices/workspaces@2023-10-01' = {
  name: workspaceName
  location: location
  properties: {
    storageAccount: storageAccount.id
    keyVault: keyVault.id
    applicationInsights: applicationInsights.id
  }
  tags:{
    'BSD Ticket Reference': tag1
    Company: tag2
    Department: tag3
    Description: tag4
    Division: tag5
    Owner: tag6
    'Parent Project': tag7
    'Project ID':tag8
  }
}

经过一番检查,工作空间绝对不可能真正不能部署在北欧地区。如果通过门户完成部署到该区域,则不会出现任何问题。我运行了 Powershell 命令,不出所料,它显示与我尝试部署的类型相同的资源确实位于北欧:

Name              : fewgdsgdf
ResourceGroupName : rg-TemplateTest-AzureAI-001
ResourceType      : Microsoft.MachineLearningServices/workspaces
Location          : northeurope
ResourceId        : /subscriptions/<subid>/resourceGroups/rg-TemplateTest-AzureAI-001/providers/Microsoft.MachineLearningServices/workspaces/fewgdsgdf

我尝试切换部署中的 API 版本,但这也不起作用。这可能是微软方面的事情吗?

azure azure-bicep
1个回答
0
投票

问题解决了。事实证明,实际上是 API 版本错误。由于某种原因,您只能在 2022 年 12 月 1 日预览版中在该区域进行部署。

© www.soinside.com 2019 - 2024. All rights reserved.