Skip to content

azurermAadb2CDirectory

Manages an AAD B2C Directory.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.aadb2CDirectory.Aadb2CDirectory(this, "example", {
  country_code: "US",
  data_residency_location: "United States",
  display_name: "example-b2c-tenant",
  domain_name: "exampleb2ctenant.onmicrosoft.com",
  resource_group_name: "example-rg",
  sku_name: "PremiumP1",
});

Arguments Reference

The following arguments are supported:

  • countryCode - (Optional) Country code of the B2C tenant. The countryCode should be valid for the specified dataResidencyLocation. See official docs for valid country codes. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created.

  • dataResidencyLocation - (Required) Location in which the B2C tenant is hosted and data resides. The dataResidencyLocation should be valid for the specified countryCode. See official docs for more information. Changing this forces a new AAD B2C Directory to be created. Possible values are asiaPacific, australia, europe, global and unitedStates.

  • displayName - (Optional) The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created.

  • domainName - (Required) Domain name of the B2C tenant, including the onmicrosoftCom suffix. Changing this forces a new AAD B2C Directory to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the AAD B2C Directory should exist. Changing this forces a new AAD B2C Directory to be created.

  • skuName - (Required) Billing SKU for the B2C tenant. Must be one of: premiumP1 or premiumP2 (standard is not supported). See official docs for more information.

  • tags - (Optional) A mapping of tags which should be assigned to the AAD B2C Directory.

Attributes Reference

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

  • id - The ID of the AAD B2C Directory.

  • billingType - The type of billing for the AAD B2C tenant. Possible values include: mau or auths.

  • effectiveStartDate - The date from which the billing type took effect. May not be populated until after the first billing cycle.

  • tenantId - The Tenant ID for the AAD B2C tenant.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the AAD B2C Directory.
  • read - (Defaults to 5 minutes) Used when retrieving the AAD B2C Directory.
  • update - (Defaults to 30 minutes) Used when updating the AAD B2C Directory.
  • delete - (Defaults to 30 minutes) Used when deleting the AAD B2C Directory.

Import

AAD B2C Directories can be imported using the resourceId, e.g.

terraform import azurerm_aadb2c_directory.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.AzureActiveDirectory/b2cDirectories/directory-name