Skip to content

Auth, organization and service account fixes #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions docs/stackit_organization_member_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ stackit organization member list [flags]

```
List all members of an organization
$ stackit organization role list --organization-id xxx
$ stackit organization member list --organization-id xxx
List all members of an organization in JSON format
$ stackit organization role list --organization-id xxx --output-format json
$ stackit organization member list --organization-id xxx --output-format json
List up to 10 members of an organization
$ stackit organization role list --organization-id xxx --limit 10
$ stackit organization member list --organization-id xxx --limit 10
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_service-account_token_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ stackit service-account token create [flags]

```
Create an access token for the service account with email "[email protected]" with a default time to live
$ stackit service-account token create --sa-email [email protected]
$ stackit service-account token create --email [email protected]
Create an access token for the service account with email "[email protected]" with a time to live of 10 days
$ stackit service-account token create --email [email protected] --ttl-days 10
Expand Down
6 changes: 3 additions & 3 deletions internal/cmd/organization/member/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ func NewCmd() *cobra.Command {
Example: examples.Build(
examples.NewExample(
`List all members of an organization`,
"$ stackit organization role list --organization-id xxx"),
"$ stackit organization member list --organization-id xxx"),
examples.NewExample(
`List all members of an organization in JSON format`,
"$ stackit organization role list --organization-id xxx --output-format json"),
"$ stackit organization member list --organization-id xxx --output-format json"),
examples.NewExample(
`List up to 10 members of an organization`,
"$ stackit organization role list --organization-id xxx --limit 10"),
"$ stackit organization member list --organization-id xxx --limit 10"),
),
RunE: func(cmd *cobra.Command, args []string) error {
ctx := context.Background()
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/service-account/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func NewCmd() *cobra.Command {
return fmt.Errorf("delete service account: %w", err)
}

cmd.Printf("Service account %s deleted", model.Email)
cmd.Printf("Service account %s deleted\n", model.Email)
return nil
},
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/service-account/key/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func NewCmd() *cobra.Command {
return fmt.Errorf("create service account key: %w", err)
}

cmd.PrintErrf("Created key for service account %s\n", model.ServiceAccountEmail)
cmd.PrintErrf("Created key for service account %s with id %s\n", model.ServiceAccountEmail, *resp.Id)

key, err := json.MarshalIndent(resp, "", " ")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/service-account/token/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func NewCmd() *cobra.Command {
Example: examples.Build(
examples.NewExample(
`Create an access token for the service account with email "[email protected]" with a default time to live`,
"$ stackit service-account token create --sa-email [email protected]"),
"$ stackit service-account token create --email [email protected]"),
examples.NewExample(
`Create an access token for the service account with email "[email protected]" with a time to live of 10 days`,
"$ stackit service-account token create --email [email protected] --ttl-days 10"),
Expand Down