-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Context
When using several applications on scalingo, there might be multiple parameters that differ in some commands, leading to complex usage of the CLI.
The use of this feature is tightly linked to #1079.
Example
scalingo db-tunnel --region osc-secnum-fr1 --app xxx-production -p 1234 SCALINGO_POSTGRESQL_URL
scalingo db-tunnel --region osc-fr1 --app xxx-staging -p 5678 SCALINGO_POSTGRESQL_URL=> here, when changing the command from staging to production, I need to change 3 parameters: the app name, the region, and the port. Ideally, I would just need to change the app name and have all 3 parameters applied according to my local configuration.
NB: the
-pflag cannot be specified in the confguration file at the moment, it's a proposal in #1079
Proposed solution
The configuration file should allow defaults per app:
{
"region": "osc-fr1", // fallback value if app doesn't override it
"applications": {
"xxx-production": {
"region": "osc-secnum-fr1"
}
}
}Alternatively, the configuration per application could be located in another file, but it might be less comprehensive, and would complexify managing fallback value.