Skip to content

azurermSiteRecoveryServicesVaultHypervSite

Manages a HyperV Site in Recovery Service Vault.

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: "eastus",
    name: "example-rg",
  }
);
const azurermRecoveryServicesVaultExample =
  new azurerm.recoveryServicesVault.RecoveryServicesVault(this, "example_1", {
    location: azurermResourceGroupExample.location,
    name: "example-vault",
    resource_group_name: azurermResourceGroupExample.name,
    sku: "Standard",
    soft_delete_enabled: false,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermRecoveryServicesVaultExample.overrideLogicalId("example");
const azurermSiteRecoveryServicesVaultHypervSiteExample =
  new azurerm.siteRecoveryServicesVaultHypervSite.SiteRecoveryServicesVaultHypervSite(
    this,
    "example_2",
    {
      name: "example-site",
      recovery_vault_id: azurermRecoveryServicesVaultExample.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSiteRecoveryServicesVaultHypervSiteExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this Recovery Service. Changing this forces a new Site to be created.

  • recoveryVaultId - (Required) The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Recovery Service.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Recovery Service.
  • read - (Defaults to 5 minutes) Used when retrieving the Recovery Service.
  • delete - (Defaults to 180 minutes) Used when deleting the Recovery Service.

Import

Recovery Services can be imported using the resourceId, e.g.

terraform import azurerm_site_recovery_services_vault_hyperv_site.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/fabric1