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
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
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
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
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
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
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
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 {
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
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
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"
Parameters
-
id
optional computed - string -
name
required - string -
recovery_vault_name
required - string -
resource_group_name
required - string -
timezone
optional - string -
backup
list block -
retention_daily
list block-
count
required - number
-
-
timeouts
single block
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.