@@ -1450,12 +1450,12 @@ func expandSqlDatabaseInstanceSettings(configured []interface{}, databaseVersion
1450
1450
UserLabels : tpgresource .ConvertStringMap (_settings ["user_labels" ].(map [string ]interface {})),
1451
1451
BackupConfiguration : expandBackupConfiguration (_settings ["backup_configuration" ].([]interface {})),
1452
1452
DatabaseFlags : expandDatabaseFlags (_settings ["database_flags" ].(* schema.Set ).List ()),
1453
- ConnectionPoolConfig : expandConnectionPoolConfig (_settings ["connection_pool_config" ].(* schema.Set ).List ()),
1454
1453
IpConfiguration : expandIpConfiguration (_settings ["ip_configuration" ].([]interface {}), databaseVersion ),
1455
1454
LocationPreference : expandLocationPreference (_settings ["location_preference" ].([]interface {})),
1456
1455
MaintenanceWindow : expandMaintenanceWindow (_settings ["maintenance_window" ].([]interface {})),
1457
1456
InsightsConfig : expandInsightsConfig (_settings ["insights_config" ].([]interface {})),
1458
1457
PasswordValidationPolicy : expandPasswordValidationPolicy (_settings ["password_validation_policy" ].([]interface {})),
1458
+ ConnectionPoolConfig : expandConnectionPoolConfig (_settings ["connection_pool_config" ].(* schema.Set ).List ()),
1459
1459
}
1460
1460
1461
1461
resize := _settings ["disk_autoresize" ].(bool )
@@ -2189,7 +2189,7 @@ func resourceSqlDatabaseInstanceUpdate(d *schema.ResourceData, meta interface{})
2189
2189
}
2190
2190
2191
2191
// Database Version is required for all calls with Google ML integration enabled or it will be rejected by the API.
2192
- if d .Get ("settings.0.enable_google_ml_integration" ).(bool ) {
2192
+ if d .Get ("settings.0.enable_google_ml_integration" ).(bool ) || len ( _settings [ "connection_pool_config" ].( * schema. Set ). List ()) > 0 {
2193
2193
instance .DatabaseVersion = databaseVersion
2194
2194
}
2195
2195
0 commit comments