Skip to content

azurermDataProtectionBackupPolicyBlobStorage

Manages a Backup Policy Blob Storage.

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");
const azurermDataProtectionBackupPolicyBlobStorageExample =
  new azurerm.dataProtectionBackupPolicyBlobStorage.DataProtectionBackupPolicyBlobStorage(
    this,
    "example_2",
    {
      name: "example-backup-policy",
      retention_duration: "P30D",
      vault_id: azurermDataProtectionBackupVaultExample.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.*/
azurermDataProtectionBackupPolicyBlobStorageExample.overrideLogicalId(
  "example"
);

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created.

  • vaultId - (Required) The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created.

  • retentionDuration - (Required) Duration of deletion after given timespan. It should follow iso8601 duration format. Changing this forces a new Backup Policy Blob Storage to be created.

Attributes Reference

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

  • id - The ID of the Backup Policy Blob Storage.

Timeouts

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

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

Import

Backup Policy Blob Storages can be imported using the resourceId, e.g.

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