fix: document secret names more coherently
continuous-integration/drone/push Build is failing Details

Closes coop-cloud/organising#215.
This commit is contained in:
decentral1se 2021-11-02 14:21:55 +01:00
parent 0486091768
commit bd92c52eed
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 23 additions and 3 deletions

View File

@ -99,7 +99,19 @@ var appSecretInsertCommand = &cli.Command{
Aliases: []string{"i"},
Usage: "Insert secret",
Flags: []cli.Flag{internal.PassFlag},
ArgsUsage: "<secret> <version> <data>",
ArgsUsage: "<secret-name> <version> <data>",
Description: `
This command inserts a secret into an app environment.
This can be useful when you want to manually generate secrets for an app
environment. Typically, you can let Abra generate them for you on app creation
(see "abra app new --secrets" for more).
Example:
abra app myapp secret insert db_pass v1 mySecretPassword
`,
Action: func(c *cli.Context) error {
app := internal.ValidateApp(c)
@ -131,12 +143,20 @@ var appSecretRmCommand = &cli.Command{
Usage: "Remove a secret",
Aliases: []string{"rm"},
Flags: []cli.Flag{allSecretsFlag, internal.PassFlag},
ArgsUsage: "<secret>",
ArgsUsage: "<secret-name>",
Description: `
This command removes a secret from an app environment.
Example:
abra app myapp secret remove db_pass
`,
Action: func(c *cli.Context) error {
app := internal.ValidateApp(c)
if c.Args().Get(1) != "" && allSecrets {
internal.ShowSubcommandHelpAndError(c, errors.New("cannot use '<secret>' and '--all' together"))
internal.ShowSubcommandHelpAndError(c, errors.New("cannot use '<secret-name>' and '--all' together"))
}
if c.Args().Get(1) == "" && !allSecrets {