terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

Support for backup frequency in azurerm_data_protection_backup_policy_blob_storage

Open simaotwx opened this issue 2 years ago • 9 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, 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

Description

The azurerm_data_protection_backup_policy_blob_storage does not set backup frequency:

image

This means that the resource azurerm_data_protection_backup_policy_blob_storage is useless because no backups are created after creating the policy and backup instance.

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

azurerm_data_protection_backup_policy_blob_storage

Potential Terraform Configuration

resource "azurerm_data_protection_backup_policy_blob_storage" "example" {
  name               = "example-backup-policy"
  vault_id           = azurerm_data_protection_backup_vault.example.id
  retention_duration = "P30D"
  backup_frequency   = "P1D"
}

// or just like azurerm_data_protection_backup_policy_disk:

resource "azurerm_data_protection_backup_policy_blob_storage" "example" {
  name               = "example-backup-policy"
  vault_id           = azurerm_data_protection_backup_vault.example.id
  retention_duration = "P30D"

  backup_repeating_time_intervals = ["R/2021-11-01T03:00:00+00:00/P1D"]

  retention_rule {
    name     = "Weekly"
    duration = "P1Y"
    priority = 20
    criteria {
      absolute_criteria = "FirstOfWeek"
    }
  }
}

References

No response

simaotwx avatar May 09 '22 12:05 simaotwx

@simaotwx imo thats works as designed Operational backup performs continuous backup of blobs and does not require a schedule. see https://learn.microsoft.com/en-us/azure/backup/blob-backup-overview

if you create a policy with the Portal (ARM) there is also no schedule

Netkracker avatar Jan 16 '23 12:01 Netkracker

@Netkracker I think you might be right but it would still be great to be able to specify the backup frequency regardless of whether it is required.

simaotwx avatar Jan 16 '23 12:01 simaotwx

hi , wondering if there are any update on this ? you can definitely configure it in azure portal, but not in azurerm_data_protection_backup_policy_blob_storage.. image

sokoloffmaks avatar May 31 '23 03:05 sokoloffmaks

Oh, still wating this to be availble. Although this is in preview. Here is similar feature request in open state.

RSwarnkar avatar Oct 26 '23 14:10 RSwarnkar

Now with the addition of vaulted backups in Public Preview, are there any plans to revisit this issue? Now there is a need for setting the backup frequency in the resource.

Maybe the following would fit a new issue altogether but there is also a need to deal with container selection for vaulted backups, I don't know if the policy resource or the vault one itself would be the most appropriate to house the config.

jorgealziro avatar Dec 20 '23 14:12 jorgealziro

Re-pushing this feature since this is a given and the main point to even generate the backup policy for the blob storage. What use is a backup policy if it doesn't trigger/schedule any backup?

camoes avatar Feb 28 '24 18:02 camoes

+1 for this. Please add the possibility to configure the frequency of a backup (vaulted backup policy). The Azure portal provides this feature image

huf1 avatar Mar 25 '24 13:03 huf1

Would really appreciate having this added!

ideonrandy avatar Apr 24 '24 21:04 ideonrandy

I don't know GO but probably we should be able to add the CreateOrUpdate BackupPolicy property source:([https://learn.microsoft.com/en-us/rest/api/dataprotection/backup-policies/create-or-update?view=rest-dataprotection-2023-01-01&tabs=HTTP]

"trigger": { "schedule": { "repeatingTimeIntervals": [ "R/2019-11-20T08:00:00-08:00/P1W" ] }, to the request

and as parameter in: Source:func resourceDataProtectionBackupPolicyBlobStorage()

)

ricred avatar May 08 '24 13:05 ricred