» 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            = "West US"
  resource_group_name = "${azurerm_resource_group.example.name}"
  sku                 = "Standard"
}

resource "azurerm_eventhub_namespace_disaster_recovery_config" "example" {
  name                 = "replicate-evenhub"
  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:

  • name - (Required) Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.

  • namespace_name - (Required) Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.

  • resource_group_name - (Required) The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.

  • partner_namespace_id - (Optional) The ID of the EventHub Namespace to replicate to.

  • alternate_name - (Optional) An alternate name to use when the Disaster Recovery Config's name is the same as the replicated namespace's name.

  • wait_for_replication - (Optional) Should the resource wait for replication upon creation? Defaults to false.

» Attributes Reference

The following attributes are exported:

  • id - The EventHub Namespace Disaster Recovery Config ID.

» 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