azurermSiteRecoveryReplicationPolicy
Manages a Azure Site Recovery replication policy within a recovery vault. Replication policies define the frequency at which recovery points are created and how long they are stored.
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 azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "East US",
name: "tfex-network-mapping-secondary",
}
);
const azurermRecoveryServicesVaultVault =
new azurerm.recoveryServicesVault.RecoveryServicesVault(this, "vault", {
location: azurermResourceGroupExample.location,
name: "example-recovery-vault",
resource_group_name: azurermResourceGroupExample.name,
sku: "Standard",
});
new azurerm.siteRecoveryReplicationPolicy.SiteRecoveryReplicationPolicy(
this,
"policy",
{
application_consistent_snapshot_frequency_in_minutes: "${4 * 60}",
name: "policy",
recovery_point_retention_in_minutes: "${24 * 60}",
recovery_vault_name: azurermRecoveryServicesVaultVault.name,
resource_group_name: azurermResourceGroupExample.name,
}
);
Argument Reference
The following arguments are supported:
-
name
- (Required) The name of the replication policy. Changing this forces a new resource to be created. -
resourceGroupName
- (Required) Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. -
recoveryVaultName
- (Required) The name of the vault that should be updated. Changing this forces a new resource to be created. -
recoveryPointRetentionInMinutes
- (Required) The duration in minutes for which the recovery points need to be stored. -
applicationConsistentSnapshotFrequencyInMinutes
- (Required) Specifies the frequency(in minutes) at which to create application consistent recovery points.
-> Note: The value of applicationConsistentSnapshotFrequencyInMinutes
must be less than or equal to the value of recoveryPointRetentionInMinutes
.
Attributes Reference
In addition to the arguments above, the following attributes are exported:
id
- The ID of the Site Recovery Replication Policy.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Site Recovery Replication Policy.update
- (Defaults to 30 minutes) Used when updating the Site Recovery Replication Policy.read
- (Defaults to 5 minutes) Used when retrieving the Site Recovery Replication Policy.delete
- (Defaults to 30 minutes) Used when deleting the Site Recovery Replication Policy.
Import
Site Recovery Replication Policies can be imported using the resourceId
, e.g.