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.
Terraform Version
1.9.8
AzureRM Provider Version
4.6.0
Affected Resource(s)/Data Source(s)
azurerm_mssql_database
Terraform Configuration Files
resource"azurerm_mssql_database""this" {
name=var.nameserver_id=var.server_idsku_name="HS_S_Gen5_2"...short_term_retention_policy {
retention_days=7backup_interval_in_hours=0# <== only 12 or 24 are accepted
}
Debug Output/Panic Output
╷
│ Error: expected short_term_retention_policy.0.backup_interval_in_hours to be one of [12 24], got 0
│
│ with module.pur_mssql_db[0].azurerm_mssql_database.this,
│ on .terraform/modules/pur_mssql_db/mssql_db_hs_s/main.tf line 20, in resource "azurerm_mssql_database""this":
│ 20: backup_interval_in_hours = local.fixed_values.str_backup_interval_hours
│
╵
Expected Behaviour
provider should not enforce a value of "12" or "24" for HyperScale SKUs.
Hi @fotto thanks for opening this issue. I assume that after PR is merged, for HyperScale DB , by not specifying a value of backup_interval_in_hours instead set it to 0. Could you please remove it and try again? Like this:
Hi @sinbai , many thanks for that hint. I can confirm that it solves the issue:
tested for update
and for creation of new HyperScale DB
So, the issue boils down to a pending documentation update for azurerm_mssql_database.
I suggest to add something like this to the description of backup_interval_in_hours:
This attribute must not be set for Hyperscale DBs or for DBs running within a Hyperscale Elastic Pool
Is there an existing issue for this?
Community Note
Terraform Version
1.9.8
AzureRM Provider Version
4.6.0
Affected Resource(s)/Data Source(s)
azurerm_mssql_database
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
provider should not enforce a value of "12" or "24" for HyperScale SKUs.
Rationale
If I set an allowed value, e.g.
then the change gets applied - But the next run of "terrraform plan" will then show the following configuration drift:
Conclusion: the API sets the value internally to 0 for Hyperscale DBs.
This behavior has changed recently as it seems (within last few days?)
Actual Behaviour
No response
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: