replaced the entire logic to set the default cloud while using properly cm_config