Skip to content

Allow values per application in configuration file #1080

@benjlevesque

Description

@benjlevesque

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 -p flag 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions