Skip to content

azurermSiteRecoveryReplicationRecoveryPlan

Get information about an Azure Site Recovery Plan within a Recovery Services vault. A recovery plan gathers machines into recovery groups for the purpose of failover.

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.*/
const dataAzurermRecoveryServicesVaultVault =
  new azurerm.dataAzurermRecoveryServicesVault.DataAzurermRecoveryServicesVault(
    this,
    "vault",
    {
      name: "tfex-recovery_vault",
      resource_group_name: "tfex-resource_group",
    }
  );
new azurerm.dataAzurermSiteRecoveryReplicationRecoveryPlan.DataAzurermSiteRecoveryReplicationRecoveryPlan(
  this,
  "example",
  {
    name: "example-recovery-plan",
    recovery_vault_id: dataAzurermRecoveryServicesVaultVault.id,
  }
);

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the Replication Plan.

  • recoveryVaultId - (Required) The ID of the vault that should be updated.

Attributes Reference

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

  • id - The ID of the Site Recovery Fabric.

  • sourceRecoveryFabricId - The ID of source fabric to be recovered from.

  • targetRecoveryFabricId - The ID of target fabric to recover.

  • recoveryGroup - recoveryGroup block defined as below.


A recoveryGroups block supports the following:

  • type - The Recovery Plan Group Type. Possible values are boot, failover and shutdown.

  • replicatedProtectedItems - one or more id of protected VM.

  • preAction - one or more action block. which will be executed before the group recovery.

  • postAction - one or more action block. which will be executed after the group recovery.


An action block supports the following:

  • name - Name of the Action.

  • type - Type of the action detail.

  • failOverDirections - Directions of fail over.

  • failOverTypes - Types of fail over.

  • fabricLocation - The fabric location of runbook or script.

  • runbookId - Id of runbook.

  • manualActionInstruction - Instructions of manual action.

  • scriptPath - Path of action script.

Timeouts

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

  • read - (Defaults to 5 minutes) Used when retrieving the Site Recovery Replication Plan.