Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/stackit_beta_alb.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ stackit beta alb [flags]

* [stackit beta](./stackit_beta.md) - Contains beta STACKIT CLI commands
* [stackit beta alb create](./stackit_beta_alb_create.md) - Creates an application loadbalancer
* [stackit beta alb credentials](./stackit_beta_alb_credentials.md) - Provides functionality for application loadbalancer credentials
* [stackit beta alb delete](./stackit_beta_alb_delete.md) - Deletes an application loadbalancer
* [stackit beta alb describe](./stackit_beta_alb_describe.md) - Describes an application loadbalancer
* [stackit beta alb list](./stackit_beta_alb_list.md) - Lists albs
* [stackit beta alb plans](./stackit_beta_alb_plans.md) - Lists the alb plans
* [stackit beta alb pool](./stackit_beta_alb_pool.md) - Manages target pools for application loadbalancers
* [stackit beta alb quotas](./stackit_beta_alb_quotas.md) - Gets the quotas
* [stackit beta alb template](./stackit_beta_alb_template.md) - creates configuration templates to use for resource creation
* [stackit beta alb update](./stackit_beta_alb_update.md) - Updates an application loadbalancer

38 changes: 38 additions & 0 deletions docs/stackit_beta_alb_credentials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## stackit beta alb credentials

Provides functionality for application loadbalancer credentials

### Synopsis

Provides functionality for application loadbalancer credentials

```
stackit beta alb credentials [flags]
```

### Options

```
-h, --help Help for "stackit beta alb credentials"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta alb](./stackit_beta_alb.md) - Manages application loadbalancers
* [stackit beta alb credentials create](./stackit_beta_alb_credentials_create.md) - Creates a credential
* [stackit beta alb credentials delete](./stackit_beta_alb_credentials_delete.md) - Deletes credentials
* [stackit beta alb credentials describe](./stackit_beta_alb_credentials_describe.md) - Describes credentials
* [stackit beta alb credentials list](./stackit_beta_alb_credentials_list.md) - Lists all credentials
* [stackit beta alb credentials update](./stackit_beta_alb_credentials_update.md) - Update credentials

42 changes: 42 additions & 0 deletions docs/stackit_beta_alb_credentials_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## stackit beta alb credentials create

Creates a credential

### Synopsis

Creates a credential.

```
stackit beta alb credentials create [flags]
```

### Examples

```
Create a new credential, the password is requested interactively or read from ENV variable ALB_CREDENTIALS_PASSWORD
$ stackit beta alb credential create --username some.user --displayname master-creds
```

### Options

```
-d, --displayname string the displayname for the credentials
-h, --help Help for "stackit beta alb credentials create"
-u, --username string the username for the credentials
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta alb credentials](./stackit_beta_alb_credentials.md) - Provides functionality for application loadbalancer credentials

40 changes: 40 additions & 0 deletions docs/stackit_beta_alb_credentials_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## stackit beta alb credentials delete

Deletes credentials

### Synopsis

Deletes credentials.

```
stackit beta alb credentials delete CREDENTIAL_REF [flags]
```

### Examples

```
Delete credential with name "credential-12345"
$ stackit beta alb credentials delete credential-12345
```

### Options

```
-h, --help Help for "stackit beta alb credentials delete"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta alb credentials](./stackit_beta_alb_credentials.md) - Provides functionality for application loadbalancer credentials

40 changes: 40 additions & 0 deletions docs/stackit_beta_alb_credentials_describe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## stackit beta alb credentials describe

Describes credentials

### Synopsis

Describes credentials.

```
stackit beta alb credentials describe CREDENTIAL_REF [flags]
```

### Examples

```
Get details about credentials with name "credential-12345"
$ stackit beta alb credential describe credential-12345
```

### Options

```
-h, --help Help for "stackit beta alb credentials describe"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta alb credentials](./stackit_beta_alb_credentials.md) - Provides functionality for application loadbalancer credentials

47 changes: 47 additions & 0 deletions docs/stackit_beta_alb_credentials_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## stackit beta alb credentials list

Lists all credentials

### Synopsis

Lists all credentials.

```
stackit beta alb credentials list [flags]
```

### Examples

```
Lists all credentials
$ stackit beta alb credential list

Lists all credentials in JSON format
$ stackit beta alb credential list --output-format json

Lists up to 10 credentials
$ stackit beta alb credential list --limit 10
```

### Options

```
-h, --help Help for "stackit beta alb credentials list"
--limit int Number of credentials to list
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta alb credentials](./stackit_beta_alb_credentials.md) - Provides functionality for application loadbalancer credentials

48 changes: 48 additions & 0 deletions docs/stackit_beta_alb_credentials_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## stackit beta alb credentials update

Update credentials

### Synopsis

Update credentials.

```
stackit beta alb credentials update CREDENTIAL_REF_ARG [flags]
```

### Examples

```
Update the username
$ stackit beta alb credentials update --username test-cred2 credentials-12345

Update the displayname
$ stackit beta alb credentials update --displayname new-name credentials-12345

Update the password (is retrieved interactively or from ENV variable )
$ stackit beta alb credentials update --password credentials-12345
```

### Options

```
-d, --displayname string the displayname for the credentials
-h, --help Help for "stackit beta alb credentials update"
-u, --username string the username for the credentials
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta alb credentials](./stackit_beta_alb_credentials.md) - Provides functionality for application loadbalancer credentials

40 changes: 40 additions & 0 deletions docs/stackit_beta_alb_plans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## stackit beta alb plans

Lists the alb plans

### Synopsis

Lists the available application loadbalancer plans.

```
stackit beta alb plans [flags]
```

### Examples

```
List all application loadbalancer plans
$ stackit beta alb plans
```

### Options

```
-h, --help Help for "stackit beta alb plans"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta alb](./stackit_beta_alb.md) - Manages application loadbalancers

40 changes: 40 additions & 0 deletions docs/stackit_beta_alb_quotas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## stackit beta alb quotas

Gets the quotas

### Synopsis

Gets the current quotes for the application loadbalancers.

```
stackit beta alb quotas [flags]
```

### Examples

```
List all application loadbalancer quotas
$ stackit beta alb quotas
```

### Options

```
-h, --help Help for "stackit beta alb quotas"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta alb](./stackit_beta_alb.md) - Manages application loadbalancers

4 changes: 4 additions & 0 deletions internal/cmd/beta/alb/alb.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import (
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/delete"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/describe"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/list"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/plans"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/pool"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/quotas"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/template"
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/update"
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
Expand Down Expand Up @@ -39,5 +41,7 @@ func addSubcommands(cmd *cobra.Command, p *print.Printer) {
describe.NewCmd(p),
delete.NewCmd(p),
pool.NewCmd(p),
plans.NewCmd(p),
quotas.NewCmd(p),
)
}
10 changes: 6 additions & 4 deletions internal/cmd/beta/alb/credentials/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func readPassword() (string, error) {
return "", fmt.Errorf("cannot read password: %w", err)
}
fmt.Println()
if bytes.Equal(password, confirmation) {
if !bytes.Equal(password, confirmation) {
return "", fmt.Errorf("the password and the confirmation do not match")
}

Expand Down Expand Up @@ -169,9 +169,11 @@ func outputResult(p *print.Printer, outputFormat string, item *alb.CreateCredent
}
p.Outputln(string(details))
default:
p.Outputf("Created credential %q",
utils.PtrString(item.Credential),
)
if item.Credential != nil {
p.Outputf("Created credential %s\n",
utils.PtrString(item.Credential.CredentialsRef),
)
}
}
return nil
}
Loading