Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (52 sloc) 2.55 KB
layout page_title sidebar_current description
Azure Resource Manager: azurerm_recovery_services_protection_container
Manages a site recovery services protection container on Azure.


Manages a Azure recovery vault protection container.

Example Usage

resource "azurerm_resource_group" "primary" {
  name     = "tfex-network-mapping-primary"
  location = "West US"

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

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

resource "azurerm_recovery_services_fabric" "fabric" {
  name                         = "primary-fabric"
  resource_group_name          = "${}"
  recovery_vault_name          = "${}"
  location                     = "${azurerm_resource_group.primary.location}"

resource "azurerm_recovery_services_protection_container" "protection-container" {
  name                          = "protection-container"
  resource_group_name           = "${}"
  recovery_vault_name           = "${}"
  recovery_fabric_name          = "${}"

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the network mapping.

  • resource_group_name - (Required) Name of the resource group where the vault that should be updated is located.

  • recovery_vault_name - (Required) The name of the vault that should be updated.

  • recovery_fabric_name - (Required) Name of fabric that should contain this protection container.

Attributes Reference

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

  • id - The resource ID.


Site recovery recovery vault fabric can be imported using the resource id, e.g.

terraform import azurerm_recovery_services_protection_container.mycontainer /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/fabric-name/replicationProtectionContainers/protection-container-name
You can’t perform that action at this time.