diff --git a/cmd/scw/testdata/test-all-usage-cockpit-token-create-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-token-create-usage.golden index 154f013081..24b999156b 100644 --- a/cmd/scw/testdata/test-all-usage-cockpit-token-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-cockpit-token-create-usage.golden @@ -7,7 +7,7 @@ USAGE: ARGS: [project-id] Project ID to use. If none is passed the default project ID will be used - [name] + [name=] [scopes.query-metrics] [scopes.write-metrics] [scopes.setup-metrics-rules] diff --git a/docs/commands/cockpit.md b/docs/commands/cockpit.md index 945864fc34..125a554067 100644 --- a/docs/commands/cockpit.md +++ b/docs/commands/cockpit.md @@ -371,7 +371,7 @@ scw cockpit token create [arg=value ...] | Name | | Description | |------|---|-------------| | project-id | | Project ID to use. If none is passed the default project ID will be used | -| name | | | +| name | Default: `` | | | scopes.query-metrics | | | | scopes.write-metrics | | | | scopes.setup-metrics-rules | | | diff --git a/internal/namespaces/cockpit/v1beta1/cockpit_cli.go b/internal/namespaces/cockpit/v1beta1/cockpit_cli.go index 7558ab80b1..396c2fce79 100644 --- a/internal/namespaces/cockpit/v1beta1/cockpit_cli.go +++ b/internal/namespaces/cockpit/v1beta1/cockpit_cli.go @@ -206,6 +206,7 @@ func cockpitTokenCreate() *core.Command { Required: false, Deprecated: false, Positional: false, + Default: core.RandomValueGenerator("token"), }, { Name: "scopes.query-metrics",