Is there an existing issue for this?
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.
Terraform Version
v1.15.9
AzureRM Provider Version
v5.2.0
Affected Resource(s)/Data Source(s)
azurerm_backup_policy_vm
Affected Location(s)
switzerlandnorth
Terraform Configuration Files
resource "azurerm_resource_group" "example" {
name = "tfex-recovery_vault"
location = "switzerlandnorth"
}
resource "azurerm_recovery_services_vault" "example" {
name = "tfex-recovery-vault"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = "Standard"
}
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
timezone = "UTC"
backup {
frequency = "Daily"
time = "23:00"
}
retention_yearly {
count = 77
weekdays = ["Sunday"]
weeks = ["Last"]
months = ["January"]
}
tiering_policy {
archived_restore_point {
mode = "TierAfter"
duration = 90
duration_type = "Days"
}
}
}
Debug Output/Panic Output
Expected Behaviour
Setting duration_type = "Days" with duration = 90 should configure the tiering policy to move recovery points to archive tier after 90 days. If it's not supported by the API, it should throw a error.
Actual Behaviour
Regardless of the duration_type configured (Days, Weeks, Months, Years), the Azure Portal always displays and applies the value as Months. With duration = 90, this results in the portal showing "90 Months" and throwing a validation error:

Steps to Reproduce
- Create an azurerm_backup_policy_vm resource with a tiering_policy block using duration_type = "Days" and duration = 90.
- Run terraform apply
Important Factoids
No response
References
No response
Is there an existing issue for this?
Community Note
Terraform Version
v1.15.9
AzureRM Provider Version
v5.2.0
Affected Resource(s)/Data Source(s)
azurerm_backup_policy_vm
Affected Location(s)
switzerlandnorth
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Setting duration_type = "Days" with duration = 90 should configure the tiering policy to move recovery points to archive tier after 90 days. If it's not supported by the API, it should throw a error.
Actual Behaviour
Regardless of the duration_type configured (Days, Weeks, Months, Years), the Azure Portal always displays and applies the value as Months. With duration = 90, this results in the portal showing "90 Months" and throwing a validation error:

Steps to Reproduce
Important Factoids
No response
References
No response