Skip to content

Commit 0db118a

Browse files
feat(secret_manager): allow to specify an external key id when creating a secret (#4674)
Co-authored-by: Jonathan R. <[email protected]>
1 parent 1e010be commit 0db118a

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ARGS:
2020
[ephemeral-policy.expires-once-accessed] Returns `true` if the version expires after a single user access.
2121
[ephemeral-policy.action] Action to perform when the version of a secret expires (unknown_action | delete | disable)
2222
[protected] Returns `true` if secret protection is enabled on a given secret
23+
[key-id] The Scaleway's Key Manager key ID
2324
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
2425

2526
FLAGS:

docs/commands/secret.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ scw secret secret create [arg=value ...]
7474
| ephemeral-policy.expires-once-accessed | | Returns `true` if the version expires after a single user access. |
7575
| ephemeral-policy.action | One of: `unknown_action`, `delete`, `disable` | Action to perform when the version of a secret expires |
7676
| protected | | Returns `true` if secret protection is enabled on a given secret |
77+
| key-id | | The Scaleway's Key Manager key ID |
7778
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
7879

7980

internal/namespaces/secret/v1beta1/secret_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ func secretSecretCreate() *core.Command {
156156
Deprecated: false,
157157
Positional: false,
158158
},
159+
{
160+
Name: "key-id",
161+
Short: `The Scaleway's Key Manager key ID`,
162+
Required: false,
163+
Deprecated: false,
164+
Positional: false,
165+
},
159166
core.RegionArgSpec(
160167
scw.RegionFrPar,
161168
scw.RegionNlAms,

0 commit comments

Comments
 (0)