Skip to content

Commit 1bf4e1c

Browse files
committed
Fix
1 parent 7f069ea commit 1bf4e1c

File tree

5 files changed

+45
-9
lines changed

5 files changed

+45
-9
lines changed

cmd/scw/testdata/test-all-usage-iam-user-create-usage.golden

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ USAGE:
66
scw iam user create [arg=value ...]
77

88
ARGS:
9-
email Email of the user
10-
[tags.{index}] Tags associated with the user
11-
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
9+
[email] Email of the user
10+
[tags.{index}] Tags associated with the user
11+
[member.email] Email of the user to create
12+
[member.send-password-email] Whether or not to send an email containing the member's password.
13+
[member.username] The member's username
14+
[member.password] The member's password
15+
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
1216

1317
FLAGS:
1418
-h, --help help for create

docs/commands/iam.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,8 +1056,12 @@ scw iam user create [arg=value ...]
10561056

10571057
| Name | | Description |
10581058
|------|---|-------------|
1059-
| email | Required | Email of the user |
1059+
| email | | Email of the user |
10601060
| tags.{index} | | Tags associated with the user |
1061+
| member.email | | Email of the user to create |
1062+
| member.send-password-email | | Whether or not to send an email containing the member's password. |
1063+
| member.username | | The member's username |
1064+
| member.password | | The member's password |
10611065
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
10621066

10631067

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/mattn/go-isatty v0.0.20
2727
github.com/moby/buildkit v0.13.2
2828
github.com/opencontainers/go-digest v1.0.0
29-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240909084652-00d3fbf2d825
3030
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3131
github.com/spf13/cobra v1.8.1
3232
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
465465
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
466466
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
468-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30 h1:yoKAVkEVwAqbGbR8n87rHQ1dulL25rKloGadb3vm770=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30/go.mod h1:sH0u6fq6x4R5M7WxkoQFY/o7UaiItec0o1LinLCJNq8=
468+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240909084652-00d3fbf2d825 h1:bkMLD6c7sSsDlyHlCbRMStabJevV4wDGn0dHhHB7OBM=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20240909084652-00d3fbf2d825/go.mod h1:o/2twhmcz4HlhtuuubCuwQ/fe+zyzoJR85+02gy04yY=
470470
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
471471
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
472472
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/iam/v1alpha1/iam_cli.go

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"reflect"
99

1010
"github.com/scaleway/scaleway-cli/v2/core"
11-
iam "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1"
11+
"github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1"
1212
"github.com/scaleway/scaleway-sdk-go/scw"
1313
)
1414

@@ -609,7 +609,7 @@ func iamUserCreate() *core.Command {
609609
{
610610
Name: "email",
611611
Short: `Email of the user`,
612-
Required: true,
612+
Required: false,
613613
Deprecated: false,
614614
Positional: false,
615615
},
@@ -620,6 +620,34 @@ func iamUserCreate() *core.Command {
620620
Deprecated: false,
621621
Positional: false,
622622
},
623+
{
624+
Name: "member.email",
625+
Short: `Email of the user to create`,
626+
Required: false,
627+
Deprecated: false,
628+
Positional: false,
629+
},
630+
{
631+
Name: "member.send-password-email",
632+
Short: `Whether or not to send an email containing the member's password.`,
633+
Required: false,
634+
Deprecated: false,
635+
Positional: false,
636+
},
637+
{
638+
Name: "member.username",
639+
Short: `The member's username`,
640+
Required: false,
641+
Deprecated: false,
642+
Positional: false,
643+
},
644+
{
645+
Name: "member.password",
646+
Short: `The member's password`,
647+
Required: false,
648+
Deprecated: false,
649+
Positional: false,
650+
},
623651
core.OrganizationIDArgSpec(),
624652
},
625653
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)