【问题标题】:Azure Cognitive Services - System assigned identity in TerraformAzure 认知服务 - Terraform 中的系统分配标识
【发布时间】: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


    【解决方案1】:

    你是对的,terraform 文档目前没有提到这个能力(见here

    提供者是开源的,你可以找到源代码here,看起来有一个关于这个特定字段的拉取请求:https://github.com/terraform-providers/terraform-provider-azurerm/pull/12469

    【讨论】:

    • 谢谢!我想我暂时会创建一个部署后的 Powershell 脚本。
    猜你喜欢
    • 2022-10-24
    • 2020-10-29
    • 1970-01-01
    • 1970-01-01
    • 2019-04-02
    • 2019-11-17
    • 2021-05-26
    • 2021-07-17
    • 1970-01-01
    相关资源
    最近更新 更多