I have the following terraform code :
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"
}
I got the following message :
The provider hashicorp/azurerm does not support resource type "azuread_application".
According to the documentation I cannot assigned a value which is an exported attribute to configure my provider. Is there any workarround to create an azure AD B2C tenant and some app registration inside ?
CodePudding user response:
Based on the comments.
azuread_application is part of azuread provider, not the azurerm.