Skip to content
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-isatty v0.0.16
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220824154746-aa9860649253
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220825105521-d3f8784dcb8b
github.com/spf13/cobra v1.5.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220824154746-aa9860649253 h1:OlRfUqKcB4XsahOXTnI4k4RTkrzJastpAAMmXNAkPUc=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220824154746-aa9860649253/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220825105521-d3f8784dcb8b h1:HW6dHxcnYIcRD6ezTnVoFc05usBgDTsd4bCiWKcumYI=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220825105521-d3f8784dcb8b/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU=
Expand Down
34 changes: 30 additions & 4 deletions internal/namespaces/iam/v1alpha1/iam_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ func iamSSHKeyList() *core.Command {
FieldName: "CreatedAt",
},
{
FieldName: "ProjectID",
FieldName: "Fingerprint",
},
{
FieldName: "CreationIP",
FieldName: "ProjectID",
},
{
FieldName: "Disabled",
Expand Down Expand Up @@ -805,15 +805,25 @@ func iamGroupCreate() *core.Command {
return api.CreateGroup(request)

},
Examples: []*core.Example{
{
Short: "Create a group",
Raw: `scw iam group create name=foobar`,
},
},
SeeAlsos: []*core.SeeAlso{
{
Command: "scw iam group list",
Short: "List all groups",
Command: "scw iam group add-member",
Short: "Add a group member",
},
{
Command: "scw iam group delete",
Short: "Delete a group",
},
{
Command: "scw iam policy create",
Short: "Create a policy for a group",
},
},
}
}
Expand Down Expand Up @@ -973,6 +983,16 @@ func iamGroupRemoveMember() *core.Command {
return api.RemoveGroupMember(request)

},
SeeAlsos: []*core.SeeAlso{
{
Command: "scw iam group remove-member",
Short: "Remove a group member",
},
{
Command: "scw iam group create",
Short: "Create a group",
},
},
}
}

Expand Down Expand Up @@ -1195,6 +1215,12 @@ func iamPolicyCreate() *core.Command {
return api.CreatePolicy(request)

},
Examples: []*core.Example{
{
Short: "Add a policy for a group that gives InstanceFullAccess on all projects",
Raw: `scw iam policy create group-id=11111111-1111-1111-1111-111111111111 rules.0.organization-id=11111111-1111-1111-1111-111111111111 rules.0.permission-set-names.0=InstanceFullAccess`,
},
},
}
}

Expand Down