Skip to content

Commit f63ac1a

Browse files
feat(sm): add endpoint to generate password (#3138)
Co-authored-by: Jules Castéran <jcasteran@scaleway.com>
1 parent c27c308 commit f63ac1a

3 files changed

Lines changed: 8 additions & 53 deletions

File tree

cmd/scw/testdata/test-all-usage-secret-version-create-usage.golden

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@ USAGE:
66
scw secret version create [arg=value ...]
77

88
ARGS:
9-
secret-id ID of the secret
10-
data Content of the secret version. Base64 is handled by the SDK (Support file loading with @/path/to/file)
11-
[description] Description of the version
12-
[disable-previous] Disable the previous secret version
13-
[password-generation.length] Length of the password to generate (between 1 and 1024)
14-
[password-generation.no-lowercase-letters] Do not include lower case letters by default in the alphabet
15-
[password-generation.no-uppercase-letters] Do not include upper case letters by default in the alphabet
16-
[password-generation.no-digits] Do not include digits by default in the alphabet
17-
[password-generation.additional-chars] Additional ascii characters to be included in the alphabet
18-
[data-crc32] The CRC32 checksum of the data as a base-10 integer
19-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
9+
secret-id ID of the secret
10+
data Content of the secret version. Base64 is handled by the SDK (Support file loading with @/path/to/file)
11+
[description] Description of the version
12+
[disable-previous] Disable the previous secret version
13+
[data-crc32] (Optional.) The CRC32 checksum of the data as a base-10 integer
14+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
2015

2116
FLAGS:
2217
-h, --help help for create

docs/commands/secret.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,7 @@ scw secret version create [arg=value ...]
200200
| data | Required | Content of the secret version. Base64 is handled by the SDK |
201201
| description | | Description of the version |
202202
| disable-previous | | Disable the previous secret version |
203-
| password-generation.length | | Length of the password to generate (between 1 and 1024) |
204-
| password-generation.no-lowercase-letters | | Do not include lower case letters by default in the alphabet |
205-
| password-generation.no-uppercase-letters | | Do not include upper case letters by default in the alphabet |
206-
| password-generation.no-digits | | Do not include digits by default in the alphabet |
207-
| password-generation.additional-chars | | Additional ascii characters to be included in the alphabet |
208-
| data-crc32 | | The CRC32 checksum of the data as a base-10 integer |
203+
| data-crc32 | | (Optional.) The CRC32 checksum of the data as a base-10 integer |
209204
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |
210205

211206

internal/namespaces/secret/v1alpha1/secret_cli.go

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -349,44 +349,9 @@ func secretVersionCreate() *core.Command {
349349
Deprecated: false,
350350
Positional: false,
351351
},
352-
{
353-
Name: "password-generation.length",
354-
Short: `Length of the password to generate (between 1 and 1024)`,
355-
Required: false,
356-
Deprecated: false,
357-
Positional: false,
358-
},
359-
{
360-
Name: "password-generation.no-lowercase-letters",
361-
Short: `Do not include lower case letters by default in the alphabet`,
362-
Required: false,
363-
Deprecated: false,
364-
Positional: false,
365-
},
366-
{
367-
Name: "password-generation.no-uppercase-letters",
368-
Short: `Do not include upper case letters by default in the alphabet`,
369-
Required: false,
370-
Deprecated: false,
371-
Positional: false,
372-
},
373-
{
374-
Name: "password-generation.no-digits",
375-
Short: `Do not include digits by default in the alphabet`,
376-
Required: false,
377-
Deprecated: false,
378-
Positional: false,
379-
},
380-
{
381-
Name: "password-generation.additional-chars",
382-
Short: `Additional ascii characters to be included in the alphabet`,
383-
Required: false,
384-
Deprecated: false,
385-
Positional: false,
386-
},
387352
{
388353
Name: "data-crc32",
389-
Short: `The CRC32 checksum of the data as a base-10 integer`,
354+
Short: `(Optional.) The CRC32 checksum of the data as a base-10 integer`,
390355
Required: false,
391356
Deprecated: false,
392357
Positional: false,

0 commit comments

Comments
 (0)