Azure Recovery Services Policy File Share

This page shows how to write Terraform and Azure Resource Manager for Recovery Services Policy File Share and write them securely.

azurerm_backup_policy_file_share (Terraform)

The Policy File Share in Recovery Services can be configured in Terraform with the resource name azurerm_backup_policy_file_share. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

backup_policies_file_share.tf#L1
resource "azurerm_backup_policy_file_share" "fs" {
  depends_on = [azurerm_recovery_services_vault.asr]
  for_each   = try(var.settings.backup_policies.fs, {})

  name                = each.value.name
  resource_group_name = var.resource_group_name
backup_policies_file_share.tf#L1
resource "azurerm_backup_policy_file_share" "fs" {
  depends_on = [azurerm_recovery_services_vault.asr]
  for_each   = try(var.settings.backup_policies.fs, {})

  name                = each.value.name
  resource_group_name = var.resource_group_name
backup_policies_file_share.tf#L4
resource "azurerm_backup_policy_file_share" "fs" {
  for_each = try(var.settings.backup_policies.fs, {})

  name                = each.value.name
  resource_group_name = var.resource_group_name
  recovery_vault_name = azurerm_recovery_services_vault.asr.name
main.tf#L7
resource "azurerm_backup_policy_file_share" "this" {
  name                = var.name
  recovery_vault_name = var.recovery_vault_name
  resource_group_name = var.resource_group_name
  timezone            = var.timezone

main.tf#L7
resource "azurerm_backup_policy_file_share" "this" {
  name                = var.name
  recovery_vault_name = var.recovery_vault_name
  resource_group_name = var.resource_group_name
  timezone            = var.timezone

backup_policies_file_share.tf#L4
resource "azurerm_backup_policy_file_share" "fs" {
  for_each = try(var.settings.backup_policies.fs, {})

  name                = each.value.name
  resource_group_name = var.resource_group_name
  recovery_vault_name = azurerm_recovery_services_vault.asr.name
backup.tf#L14
resource "azurerm_backup_policy_file_share" "daily" {
  name                = "valheim-recovery-vault-policy"
  resource_group_name = azurerm_resource_group.rg.name
  recovery_vault_name = azurerm_recovery_services_vault.vault.name

  backup {
backup_policies_file_share.tf#L4
resource "azurerm_backup_policy_file_share" "fs" {
  for_each = try(var.settings.backup_policies.fs, {})

  name                = each.value.name
  resource_group_name = var.resource_group_name
  recovery_vault_name = azurerm_recovery_services_vault.asr.name
r-file-policy.tf#L1
resource "azurerm_backup_policy_file_share" "file_share_backup_policy" {
  name                = coalesce(var.file_share_backup_policy_custom_name, local.file_share_policy_default_name)
  resource_group_name = var.resource_group_name
  recovery_vault_name = azurerm_recovery_services_vault.vault.name

  timezone = var.file_share_backup_policy_timezone
main.tf#L175
resource "azurerm_backup_policy_file_share" "policy" {
  name                = "share-vault-policy"
  resource_group_name = var.RG_NAME
  recovery_vault_name = azurerm_recovery_services_vault.VAULT.name

  timezone = "UTC"

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages an Azure File Share Backup Policy within a Recovery Services vault.

Microsoft.RecoveryServices/vaults/backupPolicies (Azure Resource Manager)

The vaults/backupPolicies in Microsoft.RecoveryServices can be configured in Azure Resource Manager with the resource name Microsoft.RecoveryServices/vaults/backupPolicies. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Frequently asked questions

What is Azure Recovery Services Policy File Share?

Azure Recovery Services Policy File Share is a resource for Recovery Services of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Recovery Services Policy File Share?

For Terraform, the anmoltoppo/Terraform, davesee/terraform-caf-rover-breakout and pkhuntia/aztfmod source code examples are useful. See the Terraform Example section for further details.