Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(secret-manager): switch to v1beta1 #3747

Merged
merged 1 commit into from
Apr 4, 2024
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

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions cmd/scw/testdata/test-all-usage-secret-folder-list-usage.golden

This file was deleted.

22 changes: 0 additions & 22 deletions cmd/scw/testdata/test-all-usage-secret-folder-usage.golden

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ USAGE:

ARGS:
secret-id ID of the secret
[product] ID of the product to add (unknown | edge_services)
[product] ID of the product to add (unknown_product | edge_services)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

DEPRECATED ARGS:
[product-name] (Deprecated: use `product` field) Name of the product to add

FLAGS:
-h, --help help for add-owner

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ USAGE:
scw secret secret create [arg=value ...]

EXAMPLES:
Add a given secret
Create a given secret
scw secret secret create name=foobar description="$(cat <path/to/your/secret>)"

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[name] Name of the secret
[tags.{index}] List of the secret's tags
[description] Description of the secret
[type] Type of the secret (unknown_secret_type | opaque | certificate | key_value)
[type] Type of the secret (unknown_type | opaque | certificate | key_value | basic_credentials | database_credentials | ssh_key)
[path] Path of the secret
[ephemeral-policy.time-to-live] Time frame, from one second and up to one year, during which the secret's versions are valid.
[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)
[is-protected] Returns `true` if secret protection is enabled on a given secret
[protected] Returns `true` if secret protection is enabled on a given secret
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Delete a given secret specified by the `region` and `secret_id` parameters.

USAGE:
scw secret secret delete [arg=value ...]
scw secret secret delete <secret-id ...> [arg=value ...]

EXAMPLES:
Delete a given secret
scw secret secret delete secret-id=11111111-1111-1111-1111-111111111111
scw secret secret delete 11111111-1111-1111-1111-111111111111

ARGS:
secret-id ID of the secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Retrieve the metadata of a secret specified by the `region` and `secret_id` parameters.

USAGE:
scw secret secret get [arg=value ...]
scw secret secret get <secret-id ...> [arg=value ...]

ARGS:
secret-id ID of the secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ARGS:
[order-by] (name_asc | name_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc)
[tags.{index}] List of tags to filter on (optional)
[name] Filter by secret name (optional)
[is-managed] Filter by managed / not managed (optional)
[path] Filter by path (optional)
[is-ephemeral] Filter by ephemeral / not ephemeral (optional)
[path] Filter by exact path (optional)
[ephemeral] Filter by ephemeral / not ephemeral (optional)
[type] Filter by secret type (optional) (unknown_type | opaque | certificate | key_value | basic_credentials | database_credentials | ssh_key)
[organization-id] Filter by Organization ID (optional)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Protect a given secret specified by the `secret_id` parameter. A protected secret can be read and modified but cannot be deleted.
Enable secret protection for a given secret specified by the `secret_id` parameter. Enabling secret protection means that your secret can be read and modified, but it cannot be deleted.

USAGE:
scw secret secret protect <secret-id ...> [arg=value ...]

EXAMPLES:
Protect a secret
Enable secret protection
scw secret secret protect 11111111-1111-1111-1111-111111111111

ARGS:
secret-id ID of the secret to protect
secret-id ID of the secret to enable secret protection for
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Unprotect a given secret specified by the `secret_id` parameter. An unprotected secret can be read, modified and deleted.
Disable secret protection for a given secret specified by the `secret_id` parameter. Disabling secret protection means that your secret can be read, modified and deleted.

USAGE:
scw secret secret unprotect <secret-id ...> [arg=value ...]

EXAMPLES:
Unprotect a secret
Disable secret protection
scw secret secret unprotect 11111111-1111-1111-1111-111111111111

ARGS:
secret-id ID of the secret to unprotect
secret-id ID of the secret to disable secret protection for
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Edit a secret's metadata such as name, tag(s), description and ephemeral policy. The secret to update is specified by the `secret_id` and `region` parameters.

USAGE:
scw secret secret update [arg=value ...]
scw secret secret update <secret-id ...> [arg=value ...]

ARGS:
secret-id ID of the secret
Expand Down
4 changes: 2 additions & 2 deletions cmd/scw/testdata/test-all-usage-secret-secret-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ AVAILABLE COMMANDS:
delete Delete a secret
get Get metadata using the secret's ID
list List secrets
protect Protect a secret
unprotect Unprotect a secret
protect Enable secret protection
unprotect Disable secret protection
update Update metadata of a secret

FLAGS:
Expand Down
19 changes: 0 additions & 19 deletions cmd/scw/testdata/test-all-usage-secret-tag-list-usage.golden

This file was deleted.

7 changes: 1 addition & 6 deletions cmd/scw/testdata/test-all-usage-secret-tag-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
Tag management commands.

USAGE:
scw secret tag <command>

AVAILABLE COMMANDS:
list List tags
scw secret tag

FLAGS:
-h, --help help for tag
Expand All @@ -16,5 +13,3 @@ GLOBAL FLAGS:
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw secret tag [command] --help" for more information about a command.
3 changes: 1 addition & 2 deletions cmd/scw/testdata/test-all-usage-secret-usage.golden
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
This API allows you to conveniently store, access and share sensitive data.
This API allows you to conveniently store, access and share sensitive data such as passwords, API keys and certificates.

USAGE:
scw secret <command>

AVAILABLE COMMANDS:
folder Folder management commands
secret Secret management commands
tag Tag management commands
version Secret Version management commands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
Access sensitive data in a secret's version specified by the `region`, `secret_id` and `revision` parameters.

USAGE:
scw secret version access [arg=value ...]
scw secret version access <secret-id ...> [arg=value ...]

ARGS:
secret-id ID of the secret
revision Version number
[field] Return only the JSON field of the given name
[raw] Return only the raw payload
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@
Create a version of a given secret specified by the `region` and `secret_id` parameters.

USAGE:
scw secret version create [arg=value ...]
scw secret version create <secret-id ...> [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
[disable-previous] Disable the previous secret version
[password-generation.length] Length of the password to generate (between 1 and 1024)
[password-generation.no-lowercase-letters] Do not include lower case letters by default in the alphabet
[password-generation.no-uppercase-letters] Do not include upper case letters by default in the alphabet
[password-generation.no-digits] Do not include digits by default in the alphabet
[password-generation.additional-chars] Additional ascii characters to be included in the alphabet
[data-crc32] (Optional.) The CRC32 checksum of the data as a base-10 integer
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
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
[data-crc32] (Optional.) The CRC32 checksum of the data as a base-10 integer
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
-h, --help help for create
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Delete a secret's version and the sensitive data contained in it. Deleting a version is permanent and cannot be undone.

USAGE:
scw secret version delete [arg=value ...]
scw secret version delete <secret-id ...> [arg=value ...]

EXAMPLES:
Delete a given Secret Version
scw secret version delete secret-id=11111111-1111-1111-1111-111111111111 revision=1
scw secret version delete 11111111-1111-1111-1111-111111111111 revision=1

ARGS:
secret-id ID of the secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Make a specific version inaccessible. You must specify the `region`, `secret_id` and `revision` parameters.

USAGE:
scw secret version disable [arg=value ...]
scw secret version disable <secret-id ...> [arg=value ...]

ARGS:
secret-id ID of the secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Make a specific version accessible. You must specify the `region`, `secret_id` and `revision` parameters.

USAGE:
scw secret version enable [arg=value ...]
scw secret version enable <secret-id ...> [arg=value ...]

ARGS:
secret-id ID of the secret
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Retrieve the metadata of a secret's given version specified by the `region`, `secret_id` and `revision` parameters.

USAGE:
scw secret version get [arg=value ...]
scw secret version get <secret-id ...> [arg=value ...]

ARGS:
secret-id ID of the secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Retrieve the list of a given secret's versions specified by the `secret_id` and `region` parameters.

USAGE:
scw secret version list [arg=value ...]
scw secret version list <secret-id ...> [arg=value ...]

ARGS:
secret-id ID of the secret
[status.{index}] Filter results by status (unknown | enabled | disabled | destroyed)
[status.{index}] Filter results by status (unknown_status | enabled | disabled | deleted)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)

FLAGS:
Expand Down
Loading
Loading