Skip to content

azurermDataProtectionResourceGuard

Manages a Resource Guard.

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 azurermDataProtectionResourceGuardExample =
  new azurerm.dataProtectionResourceGuard.DataProtectionResourceGuard(
    this,
    "example_1",
    {
      location: azurermResourceGroupExample.location,
      name: "example-resourceguard",
      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.*/
azurermDataProtectionResourceGuardExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name of the Resource Guard. Changing this forces a new resource to be created.

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

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

  • vaultCriticalOperationExclusionList - (Optional) A list of the critical operations which are not protected by this Resource Guard.

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

Attributes Reference

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

  • id - The ID of the Resource Guard.

Timeouts

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

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

Import

Resource Guards can be imported using the resourceId, e.g.

terraform import azurerm_data_protection_resource_guard.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/resourceGuards/resourceGuard1