Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for setting Instant Restore Snapshot Retention in VM Backup Policy #8321

Closed
dj-singh opened this issue Sep 2, 2020 · 3 comments · Fixed by #8822
Closed

Support for setting Instant Restore Snapshot Retention in VM Backup Policy #8321

dj-singh opened this issue Sep 2, 2020 · 3 comments · Fixed by #8822

Comments

@dj-singh
Copy link

dj-singh commented Sep 2, 2020

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 "+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

Add support to set the Instant Restore Snapshot retention value. By default, the provider would create both the daily and weekly policy with a retention of 2 days. However, for Weekly Backup policies, the Instant RP retention policy range needs to be set to 5 days otherwise the policy will not work as desired.

https://docs.microsoft.com/en-us/rest/api/backup/protectionpolicies/createorupdate#azureiaasvmprotectionpolicy

New or Affected Resource(s)

  • azurerm_backup_policy_vm

Potential Terraform Configuration

resource "azurerm_backup_policy_vm" "example" {
  name                = "tfex-recovery-vault-policy"
  resource_group_name = azurerm_resource_group.example.name
  recovery_vault_name = azurerm_recovery_services_vault.example.name
 
 # Add this 
  instant_restore_retention_range = 5
  
  timezone = "UTC"

  backup {
    frequency = "Weekly"
    time          = "23:00"
    weekdays  = ["Sunday"]
  }

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

References

This feature request is to add 'instantRpRetentionRangeInDays' property in the provider:
https://docs.microsoft.com/en-us/rest/api/backup/protectionpolicies/createorupdate#azureiaasvmprotectionpolicy

  • #0000
@dj-singh
Copy link
Author

dj-singh commented Sep 2, 2020

@tombuildsstuff @ArcturusZhang - Appreciate if you guys can take a look at this issue and feature request. Here is the REST API info - https://docs.microsoft.com/en-us/rest/api/backup/protectionpolicies/createorupdate#azureiaasvmprotectionpolicy

@ghost
Copy link

ghost commented Oct 29, 2020

This has been released in version 2.34.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.34.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Nov 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants