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
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ USAGE:
scw secret version create [arg=value ...]

ARGS:
secret-id ID of the secret
data Content of the secret version. Base64 is handled by the SDK (Support file loading with @/path/to/file)
[description] Description of the version
[disable-previous] Disable the previous secret version
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
secret-id ID of the secret
data Content of the secret version. Base64 is handled by the SDK (Support file loading with @/path/to/file)
[description] Description of the version
[disable-previous] Disable the previous secret version
[password-generation.length] Length of the password to generate (between 1 and 1024)
[password-generation.no-lowercase-letters] Do not include lower case letters by default in the alphabet
[password-generation.no-uppercase-letters] Do not include upper case letters by default in the alphabet
[password-generation.no-digits] Do not include digits by default in the alphabet
[password-generation.additional-chars] Additional ascii characters to be included in the alphabet
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for create
Expand Down
5 changes: 5 additions & 0 deletions docs/commands/secret.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ scw secret version create [arg=value ...]
| data | Required | Content of the secret version. Base64 is handled by the SDK |
| description | | Description of the version |
| disable-previous | | Disable the previous secret version |
| password-generation.length | | Length of the password to generate (between 1 and 1024) |
| password-generation.no-lowercase-letters | | Do not include lower case letters by default in the alphabet |
| password-generation.no-uppercase-letters | | Do not include upper case letters by default in the alphabet |
| password-generation.no-digits | | Do not include digits by default in the alphabet |
| password-generation.additional-chars | | Additional ascii characters to be included in the alphabet |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/moby/buildkit v0.11.5
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329081537-bf8509de0894
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329091040-cc563855c7c2
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329081537-bf8509de0894 h1:a/hpDFkms0rA96XT35q3k8u3Vnue+BLhgolcLcBF4Rc=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329081537-bf8509de0894/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329091040-cc563855c7c2 h1:XNAks4A2vVw6fDGuA0EwZUgBVzF1VQrQiVjUdFOj90E=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329091040-cc563855c7c2/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
Expand Down
35 changes: 35 additions & 0 deletions internal/namespaces/secret/v1alpha1/secret_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,41 @@ func secretVersionCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "password-generation.length",
Short: `Length of the password to generate (between 1 and 1024)`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "password-generation.no-lowercase-letters",
Short: `Do not include lower case letters by default in the alphabet`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "password-generation.no-uppercase-letters",
Short: `Do not include upper case letters by default in the alphabet`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "password-generation.no-digits",
Short: `Do not include digits by default in the alphabet`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "password-generation.additional-chars",
Short: `Additional ascii characters to be included in the alphabet`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down