azurerm_site_recovery_hyperv_network_mapping

Manages a HyperV site recovery network mapping on Azure. A HyperV network mapping decides how to translate connected networks when a VM is migrated from HyperV VMM Center to Azure.

Example Usage

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "target" {
  name     = "tfex-network-mapping"
  location = "East US"
}

resource "azurerm_recovery_services_vault" "vault" {
  name                = "example-recovery-vault"
  location            = azurerm_resource_group.target.location
  resource_group_name = azurerm_resource_group.target.name
  sku                 = "Standard"
}

resource "azurerm_virtual_network" "target" {
  name                = "network"
  resource_group_name = azurerm_resource_group.target.name
  address_space       = ["192.168.2.0/24"]
  location            = azurerm_resource_group.target.location
}

resource "azurerm_site_recovery_hyperv_network_mapping" "recovery-mapping" {
  name                                              = "recovery-network-mapping"
  recovery_vault_id                                 = azurerm_recovery_services_vault.vault.id
  source_system_center_virtual_machine_manager_name = "my-vmm-server"
  source_network_name                               = "my-vmm-network"
  target_network_id                                 = azurerm_virtual_network.target.id
}

Argument Reference

The following arguments are supported:

Attributes Reference

In addition to the arguments above, the following attributes are exported:

Timeouts

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

Import

Site Recovery Network Mapping can be imported using the resource id, e.g.

terraform import  azurerm_site_recovery_hyperv_network_mapping.mymapping /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/primary-fabric-name/replicationNetworks/azureNetwork/replicationNetworkMappings/mapping-name