Skip to content

Commit d90dbc0

Browse files
Fix edition downgrade failure for an ENTERPRISE_PLUS instance with da… (#12289) (#8731)
[upstream:821357e87c510c090aabc8502fae4190152a5d99] Signed-off-by: Modular Magician <[email protected]>
1 parent 33b17b9 commit d90dbc0

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Diff for: .changelog/12289.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
sql: fixed edition downgrade failure for an `ENTERPRISE_PLUS` instance with data cache enabled.
3+
```

Diff for: google-beta/services/sql/resource_sql_database_instance.go

+1
Original file line numberDiff line numberDiff line change
@@ -2026,6 +2026,7 @@ func resourceSqlDatabaseInstanceUpdate(d *schema.ResourceData, meta interface{})
20262026
instance.Settings.SettingsVersion = int64(_settings["version"].(int))
20272027
// Collation cannot be included in the update request
20282028
instance.Settings.Collation = ""
2029+
instance.Settings.DataCacheConfig = expandDataCacheConfig(_settings["data_cache_config"].([]interface{}))
20292030

20302031
// Lock on the master_instance_name just in case updating any replica
20312032
// settings causes operations on the master.

Diff for: google-beta/services/sql/resource_sql_database_instance_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -1881,7 +1881,6 @@ func TestAccSqlDatabaseInstance_Postgres_Edition_Upgrade(t *testing.T) {
18811881
}
18821882

18831883
func TestAccSqlDatabaseInstance_Edition_Downgrade(t *testing.T) {
1884-
t.Skip("https://github.com/hashicorp/terraform-provider-google/issues/20010")
18851884
t.Parallel()
18861885
enterprisePlusTier := "db-perf-optimized-N-2"
18871886
enterpriseTier := "db-custom-2-13312"

0 commit comments

Comments
 (0)