diff --git a/cmd/scw/testdata/test-all-usage-secret-secret-create-usage.golden b/cmd/scw/testdata/test-all-usage-secret-secret-create-usage.golden index 5eb3bf4212..110411ef9e 100644 --- a/cmd/scw/testdata/test-all-usage-secret-secret-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-secret-secret-create-usage.golden @@ -20,6 +20,7 @@ ARGS: [ephemeral-policy.expires-once-accessed] Returns `true` if the version expires after a single user access. [ephemeral-policy.action] Action to perform when the version of a secret expires (unknown_action | delete | disable) [protected] Returns `true` if secret protection is enabled on a given secret + [key-id] The Scaleway's Key Manager key ID [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) FLAGS: diff --git a/docs/commands/secret.md b/docs/commands/secret.md index b513faf369..9f87160758 100644 --- a/docs/commands/secret.md +++ b/docs/commands/secret.md @@ -74,6 +74,7 @@ scw secret secret create [arg=value ...] | ephemeral-policy.expires-once-accessed | | Returns `true` if the version expires after a single user access. | | ephemeral-policy.action | One of: `unknown_action`, `delete`, `disable` | Action to perform when the version of a secret expires | | protected | | Returns `true` if secret protection is enabled on a given secret | +| key-id | | The Scaleway's Key Manager key ID | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | diff --git a/internal/namespaces/secret/v1beta1/secret_cli.go b/internal/namespaces/secret/v1beta1/secret_cli.go index a4ee1f4860..6ed1b3f4e6 100644 --- a/internal/namespaces/secret/v1beta1/secret_cli.go +++ b/internal/namespaces/secret/v1beta1/secret_cli.go @@ -156,6 +156,13 @@ func secretSecretCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "key-id", + Short: `The Scaleway's Key Manager key ID`, + Required: false, + Deprecated: false, + Positional: false, + }, core.RegionArgSpec( scw.RegionFrPar, scw.RegionNlAms,