Skip to content

Commit 4c6537c

Browse files
committed
feat(credentials): more review findings
1 parent 98011df commit 4c6537c

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

docs/stackit_beta_alb_observability-credentials_add.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,17 @@ stackit beta alb observability-credentials add [flags]
1313
### Examples
1414

1515
```
16-
Add observability credentials to an application load balancer with username "xxx" and display name "yyy". The password is entered using the terminal
17-
$ stackit beta alb observability-credentials add --username xxx --display-name yyy
18-
1916
Add observability credentials to a load balancer with username "xxx" and display name "yyy", providing the path to a file with the password as flag
2017
$ stackit beta alb observability-credentials add --username xxx --password @./password.txt --display-name yyy
21-
22-
Add observability credentials to a load balancer with username "xxx" and display name "yyy", providing the password via an environment variable
23-
$ ALB_CREDENTIALS_PASSWORD stackit beta alb observability-credentials add --username xxx --display-name yyy
2418
```
2519

2620
### Options
2721

2822
```
29-
-d, --displayname string the displayname for the credentials
23+
-d, --displayname string Displayname for the credentials
3024
-h, --help Help for "stackit beta alb observability-credentials add"
3125
--password string Password. Can be a string or a file path, if prefixed with "@" (example: @./password.txt).
32-
-u, --username string the username for the credentials
26+
-u, --username string Username for the credentials
3327
```
3428

3529
### Options inherited from parent commands

internal/cmd/beta/alb/delete/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
5656
}
5757

5858
if !model.AssumeYes {
59-
prompt := fmt.Sprintf("Are you sure you want to delete the credentials %q for project %q?", model.Name, projectLabel)
59+
prompt := fmt.Sprintf("Are you sure you want to delete the application loadbalancer %q for project %q?", model.Name, projectLabel)
6060
err = p.PromptForConfirmation(prompt)
6161
if err != nil {
6262
return err

internal/cmd/beta/alb/observability-credentials/add/add.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,9 @@ func NewCmd(p *print.Printer) *cobra.Command {
3737
Long: "Adds observability credentials (username and password) to an application load balancer. The credentials can be for Observability or another monitoring tool.",
3838
Args: cobra.NoArgs,
3939
Example: examples.Build(
40-
examples.NewExample(
41-
`Add observability credentials to an application load balancer with username "xxx" and display name "yyy". The password is entered using the terminal`,
42-
"$ stackit beta alb observability-credentials add --username xxx --display-name yyy"),
4340
examples.NewExample(
4441
`Add observability credentials to a load balancer with username "xxx" and display name "yyy", providing the path to a file with the password as flag`,
4542
"$ stackit beta alb observability-credentials add --username xxx --password @./password.txt --display-name yyy"),
46-
examples.NewExample(
47-
`Add observability credentials to a load balancer with username "xxx" and display name "yyy", providing the password via an environment variable`,
48-
"$ ALB_CREDENTIALS_PASSWORD stackit beta alb observability-credentials add --username xxx --display-name yyy"),
4943
),
5044
RunE: func(cmd *cobra.Command, _ []string) error {
5145
ctx := context.Background()
@@ -84,8 +78,8 @@ func NewCmd(p *print.Printer) *cobra.Command {
8478
}
8579

8680
func configureFlags(cmd *cobra.Command) {
87-
cmd.Flags().StringP(usernameFlag, "u", "", "the username for the credentials")
88-
cmd.Flags().StringP(displaynameFlag, "d", "", "the displayname for the credentials")
81+
cmd.Flags().StringP(usernameFlag, "u", "", "Username for the credentials")
82+
cmd.Flags().StringP(displaynameFlag, "d", "", "Displayname for the credentials")
8983
cmd.Flags().Var(flags.ReadFromFileFlag(), passwordFlag, `Password. Can be a string or a file path, if prefixed with "@" (example: @./password.txt).`)
9084

9185
cobra.CheckErr(flags.MarkFlagsRequired(cmd, usernameFlag, displaynameFlag))

0 commit comments

Comments
 (0)