azurerm_eventhub_namespace_disaster_recovery_config

Manages an Disaster Recovery Config for an Event Hub Namespace.

Example Usage

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

resource "azurerm_eventhub_namespace" "primary" {
  name                = "eventhub-primary"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Standard"
}

resource "azurerm_eventhub_namespace" "secondary" {
  name                = "eventhub-secondary"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Standard"
}

resource "azurerm_eventhub_namespace_disaster_recovery_config" "example" {
  name                 = "replicate-eventhub"
  resource_group_name  = azurerm_resource_group.example.name
  namespace_name       = azurerm_eventhub_namespace.primary.name
  partner_namespace_id = azurerm_eventhub_namespace.secondary.id
}

Argument 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

EventHubs can be imported using the resource id, e.g.

terraform import azurerm_eventhub_namespace_disaster_recovery_config.config1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/disasterRecoveryConfigs/config1