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
azurerm_mssql_database: unexpected status 400 (400 Bad Request) with error: FeatureIsNotAvailableForServiceTier: Updating property DiffBackupIntervalInHours is not available for Hyperscale service tier.
#25991
Open
1 task done
darren-hexagon opened this issue
May 16, 2024
· 0 comments
╷
│ Error: setting Short Term Retention Policies for Database (Subscription: "aaaaaaaaaaaaa"
│ Resource Group Name: "cl-aks-we-sbx-rg"
│ Server Name: "example_server_name"
│ Database Name: "dsmithtesttenantdb_10"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: FeatureIsNotAvailableForServiceTier: Updating property DiffBackupIntervalInHours is not available for Hyperscale service tier.
│
│ with module.clipper_mt_tenant["dsmithtesttenantdb_10"].azurerm_mssql_database.example-db,
│ on .terraform/modules/clipper_mt_tenant/ClipperMtMain.tf line 34, in resource "azurerm_mssql_database""example-db":
│ 34: resource "azurerm_mssql_database""example-db" {
│
╵
Operation failed: failed running terraform apply (exit 1)
Expected Behaviour
When creating a database in a Hyperscale tier elastic pool the short_term_retention_policy dynamic block for Hyperscale should only set the retention_days policy because backup_interval_in_hours does not exist on a Hyperscale tier elastic pool.
When using v3.83.0 of the provider this dynamic block worked and the database was successfully created in a hyperscale elastic pool.
When updating a database we shouldn't need a lifecycle ignore_changes block for both retention_days and backup_interval_in_hours. If we don't ignore_changes for these then the above error is thrown. Going forward, we do not want to ignore these policies because we want to be able to update them.
Actual Behaviour
Since uplifting to v3.102.0 of the provider the above error is always thrown when trying to create a database in a hyperscale tier elastic pool. However, the database appears to be successfully created in the hyperscale elastic pool in Azure, despite the Terraform error.
If we do not use a lifecycle ignore_changes block for both retention_days and backup_interval_in_hours policies the above error is always thrown when updating a database in a hyperscale tier elastic pool. This was also an issue in v3.83.0.
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Community Note
Terraform Version
1.8.3
AzureRM Provider Version
3.102.0
Affected Resource(s)/Data Source(s)
azurerm_mssql_database
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
When creating a database in a Hyperscale tier elastic pool the short_term_retention_policy dynamic block for Hyperscale should only set the retention_days policy because backup_interval_in_hours does not exist on a Hyperscale tier elastic pool.
When using v3.83.0 of the provider this dynamic block worked and the database was successfully created in a hyperscale elastic pool.
When updating a database we shouldn't need a lifecycle ignore_changes block for both retention_days and backup_interval_in_hours. If we don't ignore_changes for these then the above error is thrown. Going forward, we do not want to ignore these policies because we want to be able to update them.
Actual Behaviour
Since uplifting to v3.102.0 of the provider the above error is always thrown when trying to create a database in a hyperscale tier elastic pool. However, the database appears to be successfully created in the hyperscale elastic pool in Azure, despite the Terraform error.
If we do not use a lifecycle ignore_changes block for both retention_days and backup_interval_in_hours policies the above error is always thrown when updating a database in a hyperscale tier elastic pool. This was also an issue in v3.83.0.
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: