Skip to content

Commit fcc3960

Browse files
committed
fix: when removing regional default_user then send the global default to remove the override
1 parent f41e1de commit fcc3960

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

provider/resource_rediscloud_active_active_database.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,10 @@ func resourceRedisCloudActiveActiveDatabaseUpdate(ctx context.Context, d *schema
879879
log.Printf("[DEBUG] Update: Region %s - Field marked as explicit but not found in dbRegion map (exists=%v, val=%v)", regionName, exists, val)
880880
}
881881
} else {
882-
// Not explicitly set - don't send field, API will use global
883-
log.Printf("[DEBUG] Update: Region %s - NOT sending enable_default_user field to API (inherits from global=%v)", regionName, d.Get("global_enable_default_user").(bool))
882+
// Not explicitly set - send global value to clear any API override
883+
globalValue := d.Get("global_enable_default_user").(bool)
884+
regionProps.EnableDefaultUser = redis.Bool(globalValue)
885+
log.Printf("[DEBUG] Update: Region %s - Sending enable_default_user=%v to API (global value, to clear any override)", regionName, globalValue)
884886
}
885887

886888
if len(overrideAlerts) > 0 {

0 commit comments

Comments
 (0)