Open hatvik opened 3 years ago
I can confirm the behaviour as well. Expect for it to be recreated but I just get this error:
module.maria_db.azurerm_mariadb_server.moodle: Modifying... [id=/subscriptions/<REDACTED>/resourceGroups/ae-prod-rg-moodle/providers/Microsoft.DBforMariaDB/servers/ae-prod-maria-moodle-xxx]
Error: updating Server: (Name "ae-prod-maria-moodle-xxx" / Resource Group "ae-prod-rg-moodle"): mariadb.ServersClient#Update: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="UnsupportedUpdate" Message="Cannot update GeoRedundantBackup for server"
with module.maria_db.azurerm_mariadb_server.moodle,
on moodle/maria_db/main.tf line 43, in resource "azurerm_mariadb_server" "moodle":
43: resource "azurerm_mariadb_server" "moodle" {
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
Terraform Configuration Files
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mariadb_server#example-usage
Expected Behaviour
Plan: 0 to add, 1 to change, 0 to destroy.
Actual Behaviour
Error: updating Server: (Name "testtfazdbyj0nr01" / Resource Group "test-tfazdb-yj0nr"): mysql.ServersClient#Update: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="UnsupportedUpdate" Message="Cannot update GeoRedundantBackup for server"
Steps to Reproduce
Important Factoids
References
Configuring locally redundant or geo-redundant storage for backup is only allowed during server create. Once the server is provisioned, you cannot change the backup storage redundancy option. In order to move your backup storage from locally redundant storage to geo-redundant storage, creating a new server and migrating the data using dump and restore is the only supported option
https://docs.microsoft.com/en-us/azure/mariadb/concepts-backup#moving-from-locally-redundant-to-geo-redundant-backup-storage
https://docs.microsoft.com/en-us/azure/mysql/concepts-backup#moving-from-locally-redundant-to-geo-redundant-backup-storage
https://github.com/hashicorp/terraform-provider-azurerm/pull/5961
https://github.com/hashicorp/terraform-provider-azurerm/issues/9566