【发布时间】:2021-09-15 23:55:59
【问题描述】:
如何在 Terraform 中创建具有系统分配标识的 Azure 认知服务帐户?
我尝试了以下方法,但出现错误:此处不应出现“身份”类型的块。
resource "azurerm_cognitive_account" "cgsrv" {
# Conditionally based on feature flag
count = var.to_provision == true ? 1 : 0
name = lower(replace("${var.name_params.prefix}-cgnsrv-${var.name_params.use_case_name}", "-", ""))
location = var.location
resource_group_name = var.resourcegroup_name
kind = "CognitiveServices"
sku_name = "S0"
identity {
type = "SystemAssigned"
}
}
【问题讨论】:
标签: azure terraform azure-cognitive-services infrastructure-as-code