[cloud-sync] - Refactor setting with env var.