azurerm_api_management_identity_provider_aadb2c

Manages an API Management Azure AD B2C Identity Provider.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_api_management" "example" {
  name                = "example-apim"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  publisher_name      = "My Company"
  publisher_email     = "company@terraform.io"
  sku_name            = "Developer_1"
}

resource "azuread_application" "example" {
  display_name = "acctestam-example"
}

resource "azuread_application_password" "example" {
  application_object_id = azuread_application.example.object_id
  end_date_relative     = "36h"
}

resource "azurerm_api_management_identity_provider_aadb2c" "example" {
  resource_group_name = azurerm_resource_group.example.name
  api_management_name = azurerm_api_management.example.name
  client_id           = azuread_application.example.application_id
  client_secret       = "P@55w0rD!"
  allowed_tenant      = "myb2ctenant.onmicrosoft.com"
  signin_tenant       = "myb2ctenant.onmicrosoft.com"
  authority           = "myb2ctenant.b2clogin.com"
  signin_policy       = "B2C_1_Login"
  signup_policy       = "B2C_1_Signup"

  depends_on = [azuread_application_password.example]
}

Arguments Reference

The following arguments are supported:


Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

API Management Azure AD B2C Identity Providers can be imported using the resource id, e.g.

terraform import azurerm_api_management_identity_provider_aadb2c.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/service1/identityProviders/aadB2C