Skip to content

Commit ec33e54

Browse files
authored
feat(secret): enable secret on cli (#2779)
1 parent 2b0d214 commit ec33e54

21 files changed

+708
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ To enable beta features, you can set `SCW_ENABLE_BETA=1` in your environment.
115115
# Reference documentation
116116

117117
| Namespace | Description | Documentation |
118-
| -------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
118+
|----------------|-----------------------------------------|-----------------------------------------------------------------------------------------------------------------|
119119
| `account` | Account API | [CLI](./docs/commands/account.md) |
120120
| `applesilicon` | Apple silicon API | [CLI](./docs/commands/apple-silicon.md) / [API](https://developers.scaleway.com/en/products/apple-silicon/api/) |
121121
| `autocomplete` | Autocomplete related commands | [CLI](./docs/commands/autocomplete.md) |
@@ -138,6 +138,7 @@ To enable beta features, you can set `SCW_ENABLE_BETA=1` in your environment.
138138
| `rdb` | Database RDB API | [CLI](./docs/commands/rdb.md) / [API](https://developers.scaleway.com/en/products/rdb/api/) |
139139
| `redis` | Redis API | [CLI](./docs/commands/redis.md) / [API](https://developers.scaleway.com/en/products/redis/api/v1/) |
140140
| `registry` | Container registry API | [CLI](./docs/commands/registry.md) / [API](https://developers.scaleway.com/en/products/registry/api/) |
141+
| `secret` | Secret manager API | [CLI](./docs/commands/secret.md) |
141142
| `shell` | Start Shell mode | [CLI](./docs/commands/shell.md) |
142143
| `tem` | Transactional Email API | [CLI](./docs/commands/tem.md) / [API](https://developers.scaleway.com/en/products/transactional_email/api/) |
143144
| `vpc-gw` | VPC Gateway API | [CLI](./docs/commands/vpc-gw.md) / [API](https://developers.scaleway.com/en/products/vpc-gw/api/v1/) |
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a Secret containing no versions.
4+
5+
USAGE:
6+
scw secret secret create [arg=value ...]
7+
8+
EXAMPLES:
9+
Add a given secret
10+
scw secret secret create name=foobar description="$(cat <path/to/your/secret>)"
11+
12+
ARGS:
13+
[project-id] Project ID to use. If none is passed the default project ID will be used
14+
[name] Name of the Secret
15+
[tags.{index}] List of tags associated to this Secret
16+
[description] Description of the Secret
17+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
18+
19+
FLAGS:
20+
-h, --help help for create
21+
22+
GLOBAL FLAGS:
23+
-c, --config string The path to the config file
24+
-D, --debug Enable debug mode
25+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
26+
-p, --profile string The config profile to use
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete a secret.
4+
5+
USAGE:
6+
scw secret secret delete [arg=value ...]
7+
8+
EXAMPLES:
9+
Delete a given secret
10+
scw secret secret delete secret-id=11111111-1111-1111-1111-111111111111
11+
12+
ARGS:
13+
secret-id ID of the Secret
14+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
15+
16+
FLAGS:
17+
-h, --help help for delete
18+
19+
GLOBAL FLAGS:
20+
-c, --config string The path to the config file
21+
-D, --debug Enable debug mode
22+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
23+
-p, --profile string The config profile to use
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Get metadata of a Secret.
4+
5+
USAGE:
6+
scw secret secret get [arg=value ...]
7+
8+
ARGS:
9+
secret-id ID of the Secret
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
11+
12+
FLAGS:
13+
-h, --help help for get
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List Secrets.
4+
5+
USAGE:
6+
scw secret secret list [arg=value ...]
7+
8+
ARGS:
9+
[project-id] ID of a project to filter on (optional)
10+
[tags.{index}] List of tags to filter on (optional)
11+
[order-by] (name_asc | name_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc)
12+
[organization-id] ID of an organization to filter on (optional)
13+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all)
14+
15+
FLAGS:
16+
-h, --help help for list
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Update metadata of a Secret.
4+
5+
USAGE:
6+
scw secret secret update [arg=value ...]
7+
8+
ARGS:
9+
secret-id ID of the Secret
10+
[name] New name of the Secret (optional)
11+
[tags.{index}] New list of tags associated to this Secret (optional)
12+
[description] Description of the Secret
13+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
14+
15+
FLAGS:
16+
-h, --help help for update
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Logical container made up of zero or more immutable versions, that hold the sensitive data.
4+
5+
USAGE:
6+
scw secret secret <command>
7+
8+
AVAILABLE COMMANDS:
9+
create Create a Secret containing no versions
10+
delete Delete a secret
11+
get Get metadata of a Secret
12+
list List Secrets
13+
update Update metadata of a Secret
14+
15+
FLAGS:
16+
-h, --help help for secret
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use
23+
24+
Use "scw secret secret [command] --help" for more information about a command.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
This API allows you to conveniently store, access and share sensitive data
4+
5+
USAGE:
6+
scw secret <command>
7+
8+
AVAILABLE COMMANDS:
9+
secret Secret management commands
10+
version Secret Version management commands
11+
12+
FLAGS:
13+
-h, --help help for secret
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
20+
21+
Use "scw secret [command] --help" for more information about a command.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Access a SecretVersion, returning the sensitive data.
4+
5+
USAGE:
6+
scw secret version access [arg=value ...]
7+
8+
ARGS:
9+
secret-id ID of the Secret
10+
revision Revision of the SecretVersion (may be a number or "latest")
11+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
12+
13+
FLAGS:
14+
-h, --help help for access
15+
16+
GLOBAL FLAGS:
17+
-c, --config string The path to the config file
18+
-D, --debug Enable debug mode
19+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
20+
-p, --profile string The config profile to use
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a SecretVersion.
4+
5+
USAGE:
6+
scw secret version create [arg=value ...]
7+
8+
ARGS:
9+
secret-id ID of the Secret
10+
[data] The base64-encoded secret payload of the SecretVersion
11+
[description] Description of the SecretVersion
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
13+
14+
FLAGS:
15+
-h, --help help for create
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use

0 commit comments

Comments
 (0)