From 4c20dcac7ae6897e0b9853e047c5ce965c64209e Mon Sep 17 00:00:00 2001 From: John Gleason Date: Mon, 2 Mar 2020 16:12:28 -0600 Subject: [PATCH 1/2] Add geo-redundant restrictions blurb to the mariadb docs Geo-redundancy state cannot be changed once the server is created ([https://docs.microsoft.com/en-us/azure/mariadb/concepts-backup#backup-redundancy-options](link). This TF provider gives a somewhat generic error: `Error waiting for creation of MariaDB Server "svr-name" (Resource Group "rg-name"): Code="UnsupportedUpdate" Message="Cannot update GeoRedundantBackup for server"` This change just adds a link to the microsoft docs to help out the next guy. --- website/docs/r/mariadb_server.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/mariadb_server.html.markdown b/website/docs/r/mariadb_server.html.markdown index ad73d5900b47..fab9929fced2 100644 --- a/website/docs/r/mariadb_server.html.markdown +++ b/website/docs/r/mariadb_server.html.markdown @@ -75,7 +75,7 @@ A `storage_profile` block supports the following: * `auto_grow` - (Optional) Defines whether autogrow is enabled or disabled for the storage. Valid values are `Enabled` or `Disabled`. --> **NOTE:** Geo Redundant Backups cannot be configured when using the `Basic` tier. +-> **NOTE:** Geo Redundant Backups cannot be configured when using the `Basic` tier, and is only allowed during server create. Once the server is provisioned, you cannot change the backup storage redundancy option. [More information available here.](https://docs.microsoft.com/en-us/azure/mariadb/concepts-backup#backup-redundancy-options) ## Attributes Reference From da667b19ac27b71eacaabe4ed8b41a3a85e715fa Mon Sep 17 00:00:00 2001 From: kt Date: Mon, 9 Mar 2020 23:08:04 -0700 Subject: [PATCH 2/2] azurerm_mariadb_server - geo_redundant_backup is now force new --- .../services/mariadb/resource_arm_mariadb_server.go | 1 + website/docs/r/mariadb_server.html.markdown | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/azurerm/internal/services/mariadb/resource_arm_mariadb_server.go b/azurerm/internal/services/mariadb/resource_arm_mariadb_server.go index e6329f8d340e..251889db4847 100644 --- a/azurerm/internal/services/mariadb/resource_arm_mariadb_server.go +++ b/azurerm/internal/services/mariadb/resource_arm_mariadb_server.go @@ -119,6 +119,7 @@ func resourceArmMariaDbServer() *schema.Resource { "geo_redundant_backup": { Type: schema.TypeString, Optional: true, + ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ string(mariadb.Enabled), string(mariadb.Disabled), diff --git a/website/docs/r/mariadb_server.html.markdown b/website/docs/r/mariadb_server.html.markdown index fab9929fced2..d4419feb5fe8 100644 --- a/website/docs/r/mariadb_server.html.markdown +++ b/website/docs/r/mariadb_server.html.markdown @@ -71,11 +71,11 @@ A `storage_profile` block supports the following: * `backup_retention_days` - (Optional) Backup retention days for the server, supported values are between `7` and `35` days. -* `geo_redundant_backup` - (Optional) Enable Geo-redundant or not for server backup. Valid values for this property are `Enabled` or `Disabled`. +* `geo_redundant_backup` - (Optional) Enable Geo-redundant or not for server backup. Valid values for this property are `Enabled` or `Disabled`. Changing this forces a new resource to be created. -* `auto_grow` - (Optional) Defines whether autogrow is enabled or disabled for the storage. Valid values are `Enabled` or `Disabled`. +-> **NOTE:** Geo Redundant Backups cannot be configured when using the `Basic` tier, and is only allowed during server create. --> **NOTE:** Geo Redundant Backups cannot be configured when using the `Basic` tier, and is only allowed during server create. Once the server is provisioned, you cannot change the backup storage redundancy option. [More information available here.](https://docs.microsoft.com/en-us/azure/mariadb/concepts-backup#backup-redundancy-options) +* `auto_grow` - (Optional) Defines whether autogrow is enabled or disabled for the storage. Valid values are `Enabled` or `Disabled`. ## Attributes Reference