无法使用 terraform 创建 Azure 认知服务
Unable to create Azure Cognitive services using terraform
我正在尝试使用 terraform 创建 Azure 认知服务,但出现以下错误。尽管我们正在尝试创建“所有认知服务”类型的认知服务,但错误似乎与 QnA 有关。有什么建议吗?
resource "azurerm_cognitive_account" "azfn-rg" {
name = var.azurerm_cognitive_account_name
location = azurerm_resource_group.azfn-rg.location
resource_group_name = azurerm_resource_group.azfn-rg.name
kind = "CognitiveServices"
sku_name = "S0"
tags = var.tags
}
错误如下:
cognitiveservices.AccountsClient#Create:响应请求失败:StatusCode=400 -- 原始错误:autorest/azure:服务返回错误。 Status=400 Code="ApiPropertiesInvalid" Message="给定的 'apiProperties' '{\r\n "qnaRuntimeEndpoint": ""\r\n}' 无效。验证错误:属性 'qnaRuntimeEndpoint' 尚未定义,架构不允许附加属性。路径 'apiProperties.qnaRuntimeEndpoint'."
我可以重现这个错误。
要修复它,您可以像这样固定 provider "azurerm"
的版本。我正在使用 Terraform v0.12.28+ provider.azurerm v2.0.0
.
provider "azurerm" {
version = "=2.0.0"
features {}
}
结果
我正在尝试使用 terraform 创建 Azure 认知服务,但出现以下错误。尽管我们正在尝试创建“所有认知服务”类型的认知服务,但错误似乎与 QnA 有关。有什么建议吗?
resource "azurerm_cognitive_account" "azfn-rg" {
name = var.azurerm_cognitive_account_name
location = azurerm_resource_group.azfn-rg.location
resource_group_name = azurerm_resource_group.azfn-rg.name
kind = "CognitiveServices"
sku_name = "S0"
tags = var.tags
}
错误如下:
cognitiveservices.AccountsClient#Create:响应请求失败:StatusCode=400 -- 原始错误:autorest/azure:服务返回错误。 Status=400 Code="ApiPropertiesInvalid" Message="给定的 'apiProperties' '{\r\n "qnaRuntimeEndpoint": ""\r\n}' 无效。验证错误:属性 'qnaRuntimeEndpoint' 尚未定义,架构不允许附加属性。路径 'apiProperties.qnaRuntimeEndpoint'."
我可以重现这个错误。
要修复它,您可以像这样固定 provider "azurerm"
的版本。我正在使用 Terraform v0.12.28+ provider.azurerm v2.0.0
.
provider "azurerm" {
version = "=2.0.0"
features {}
}
结果