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,10 +6,11 @@ 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
[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
[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
1 change: 1 addition & 0 deletions docs/commands/secret.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ scw secret version create [arg=value ...]
| secret-id | Required | ID of the secret |
| 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 |
| 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
7 changes: 7 additions & 0 deletions internal/namespaces/secret/v1alpha1/secret_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,13 @@ func secretVersionCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "disable-previous",
Short: `Disable the previous secret version`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down