You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Creating this policy works as expected. If I then change backup time to another time (e-g- from 20:00 to 21:00) and execute terraform apply, following planed change appears:
~ resource "azurerm_backup_policy_vm""vm-gold-v2" {
id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-qua-chn-services-mgmt/providers/Microsoft.RecoveryServices/vaults/rsv-chn-services/backupPolicies/vm-gold-v2"
name = "vm-gold-v2"# (5 unchanged attributes hidden)~ backup {
~time = "20:00" ->"21:00"# (4 unchanged attributes hidden)
}
# (4 unchanged blocks hidden)
}
If I approve this change, following error appears:
╷
│ Error: updating Backup Policy (Subscription: "00000000-0000-0000-0000-000000000000"
│ Resource Group Name: "rg-qua-chn-services-mgmt"
│ Vault Name: "rsv-chn-services"
│ Backup Policy Name: "vm-gold-v2"): protectionpolicies.ProtectionPoliciesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BMSUserErrorInvalidPolicyInput" Message="Input for create or update policy is not in proper format. Please check format of parameters like schedule time, schedule days, retention time and retention days "
│
│ with azurerm_backup_policy_vm.vm-gold-v2,
│ on policy_vm.tf line 172, in resource "azurerm_backup_policy_vm""vm-gold-v2":
│ 172: resource "azurerm_backup_policy_vm""vm-gold-v2" {
│
╵
Expected Behaviour
Backup time can be changed the same ways, as it can be set/created.
Actual Behaviour
If backup time should be changed, an error appears:
╷
│ Error: updating Backup Policy (Subscription: "00000000-0000-0000-0000-000000000000"
│ Resource Group Name: "rg-qua-chn-services-mgmt"
│ Vault Name: "rsv-chn-services"
│ Backup Policy Name: "vm-gold-v2"): protectionpolicies.ProtectionPoliciesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BMSUserErrorInvalidPolicyInput" Message="Input for create or update policy is not in proper format. Please check format of parameters like schedule time, schedule days, retention time and retention days "
│
│ with azurerm_backup_policy_vm.vm-gold-v2,
│ on policy_vm.tf line 172, in resource "azurerm_backup_policy_vm" "vm-gold-v2":
│ 172: resource "azurerm_backup_policy_vm" "vm-gold-v2" {
│
╵
Initial creating backup policy for VMs works fine, only changes are affected.
Steps to Reproduce
Define a VM backup policy (like example above) with backup {frequency = "Daily" time = "20:00" )
Execute terraform apply to create this VM backup policy
Change Backup Time (e.g. from "20:00" to "21:00"
Execute terraform apply again and approve modification
==> Error happens.
Important Factoids
No response
References
This issue exists in azurerm version 3.112.0 to 4.2.0 (tested). probably also in previous versions (not tested).
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Community Note
Terraform Version
1.9
AzureRM Provider Version
3.116.0
Affected Resource(s)/Data Source(s)
azurerm_backup_policy_vm
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Backup time can be changed the same ways, as it can be set/created.
Actual Behaviour
If backup time should be changed, an error appears:
╷
│ Error: updating Backup Policy (Subscription: "00000000-0000-0000-0000-000000000000"
│ Resource Group Name: "rg-qua-chn-services-mgmt"
│ Vault Name: "rsv-chn-services"
│ Backup Policy Name: "vm-gold-v2"): protectionpolicies.ProtectionPoliciesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BMSUserErrorInvalidPolicyInput" Message="Input for create or update policy is not in proper format. Please check format of parameters like schedule time, schedule days, retention time and retention days "
│
│ with azurerm_backup_policy_vm.vm-gold-v2,
│ on policy_vm.tf line 172, in resource "azurerm_backup_policy_vm" "vm-gold-v2":
│ 172: resource "azurerm_backup_policy_vm" "vm-gold-v2" {
│
╵
Initial creating backup policy for VMs works fine, only changes are affected.
Steps to Reproduce
==> Error happens.
Important Factoids
No response
References
This issue exists in azurerm version 3.112.0 to 4.2.0 (tested). probably also in previous versions (not tested).
The text was updated successfully, but these errors were encountered: