在租户中为 azure ad b2c 提供资源

provision azure ad b2c with resources in the tenant

我有以下地形代码:

terraform {
  required_version = ">= 1.1"

  required_providers {
    azurerm = {
      version = ">= 3.0.2"
    }
  }
  backend "azurerm" {}
  
}

provider "azurerm" {
  subscription_id = var.subscription_id
  features {}
}

provider "azurerm" {
    alias = "aad_b2c"
    tenant_id = azurerm_aadb2c_directory.example-b2c.tenant_id
    features {}
}

resource "azurerm_aadb2c_directory" "example-b2c" {
  country_code            = "FR"
  data_residency_location = "Europe"
  display_name            = "example"
  domain_name             = "example.onmicrosoft.com"
  resource_group_name     = azurerm_resource_group.main.name
  sku_name                = "PremiumP1"
}

resource "azuread_application" "demo" {
  provider = azurerm.aad_b2c
  display_name = "demo"
}

我收到以下消息: The provider hashicorp/azurerm does not support resource type "azuread_application".

根据 the documentation,我无法分配作为导出属性的值来配置我的提供程序。是否有任何解决方法来创建 azure AD B2C 租户并在其中注册一些应用程序?

根据评论。

azuread_application is part of azuread provider, not the azurerm.