Skip to content

Support for vaulted backup in azurerm_backup_policy_file_share #29100

@plasma-tech

Description

@plasma-tech

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Description

azurerm_backup_policy_file_share does not support the new vaulted backup tier, and defaults to using snapshot

The policy can be manually changed to Vault-Standard as a workaround. Note that switching to vaulted tier appears to apply the daily/weekly/monthly/yearly retention settings to the vault, and a new retain snapshots for x day(s) setting is exposed.

Snapshot tier

Image

Vaulted tier

Image

Please could you add support for this, thanks!

New or Affected Resource(s)/Data Source(s)

azurerm_backup_policy_file_share

Potential Terraform Configuration

resource "azurerm_backup_policy_file_share" "policy" {
  name                = "testrecovery-vault-policy"
  resource_group_name = azurerm_resource_group.example.name
  recovery_vault_name = azurerm_recovery_services_vault.example.name

  timezone = "UTC"

  backup {
    frequency = "Daily"
    time      = "23:00"
  }

  retention_daily {
    count = 10
  }

  retention_weekly {
    count    = 7
    weekdays = ["Sunday", "Wednesday", "Friday", "Saturday"]
  }

  retention_monthly {
    count    = 7
    weekdays = ["Sunday", "Wednesday"]
    weeks    = ["First", "Last"]
  }

  retention_yearly {
    count    = 7
    weekdays = ["Sunday"]
    weeks    = ["Last"]
    months   = ["January"]
  }

  backup_tier = "vault-standard"
  snapshot_retention_days = 5

}

References

https://learn.microsoft.com/en-us/azure/backup/backup-azure-files?tabs=recovery-services-vault#configure-the-backup

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions