Skip to content

azurermDataProtectionBackupVault

Manages a Backup 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: "West Europe",
    name: "example-resources",
  }
);
const azurermDataProtectionBackupVaultExample =
  new azurerm.dataProtectionBackupVault.DataProtectionBackupVault(
    this,
    "example_1",
    {
      datastore_type: "VaultStore",
      location: azurermResourceGroupExample.location,
      name: "example-backup-vault",
      redundancy: "LocallyRedundant",
      resource_group_name: azurermResourceGroupExample.name,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataProtectionBackupVaultExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Backup Vault. Changing this forces a new Backup Vault to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.

  • location - (Required) The Azure Region where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.

  • datastoreType - (Required) Specifies the type of the data store. Possible values are archiveStore, snapshotStore and vaultStore. Changing this forces a new resource to be created.

  • redundancy - (Required) Specifies the backup storage redundancy. Possible values are geoRedundant and locallyRedundant. Changing this forces a new Backup Vault to be created.


  • identity - (Optional) An identity block as defined below.

  • tags - (Optional) A mapping of tags which should be assigned to the Backup Vault.


An identity block supports the following:

  • type - (Required) Specifies the type of Managed Service Identity that should be configured on this Backup Vault. The only possible value is systemAssigned.

Attributes Reference

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

  • id - The ID of the Backup Vault.

  • identity - An identity block as defined below, which contains the Identity information for this Backup Vault.


An identity block exports the following:

  • principalId - The Principal ID for the Service Principal associated with the Identity of this Backup Vault.

  • tenantId - The Tenant ID for the Service Principal associated with the Identity of this Backup Vault.

-> You can access the Principal ID via ${azurermDataProtectionBackupVaultExampleIdentity0PrincipalId} and the Tenant ID via ${azurermDataProtectionBackupVaultExampleIdentity0TenantId}

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Backup Vault.
  • read - (Defaults to 5 minutes) Used when retrieving the Backup Vault.
  • update - (Defaults to 30 minutes) Used when updating the Backup Vault.
  • delete - (Defaults to 30 minutes) Used when deleting the Backup Vault.

Import

Backup Vaults can be imported using the resourceId, e.g.

terraform import azurerm_data_protection_backup_vault.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1