Skip to content

Commit b9a8329

Browse files
Remove partial usage and add OPTIONS and example for create
1 parent 0a8775f commit b9a8329

File tree

2 files changed

+42
-11
lines changed

2 files changed

+42
-11
lines changed

src/content/docs/workers/wrangler/commands.mdx

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -737,40 +737,62 @@ With the release of [Secrets Store](/secrets-store/) in open beta, you can use t
737737
Create a secret within a store.
738738

739739
```txt
740-
wrangler secrets-store secret create <STORE_ID>
740+
wrangler secrets-store secret create <STORE_ID> [OPTIONS]
741741
```
742742

743743
- `STORE_ID` <Type text="string" /> <MetaInfo text="required" />
744744
- The secret store public ID. You can find it and copy from the [Secrets Store tab](https://dash.cloudflare.com/?to=/:account/secrets-store/) on the dashboard.
745+
- `--name` <Type text="string" /> <MetaInfo text="required" />
746+
- A descriptive name for the account-level secret.
747+
- `--scopes` <Type text="string" /> <MetaInfo text="required" />
748+
- Which services will have access to the account-level secret. Currently, only `workers` is available.
749+
- `--comment` <Type text="string" /> <MetaInfo text="optional" />
750+
- Additional information about the account-level secret.
751+
- `--remote` <Type text="boolean" /> <MetaInfo text="(default: false) optional" />
752+
- Execute the command against the remote Secrets Store. To interact with account-level secrets in production, make sure to append `--remote` to your commands.
753+
754+
The following is an example of using the `create` command to create an account-level secret.
755+
756+
```sh
757+
npx wrangler secrets-store secret create 8f7a1cdced6342c18d223ece462fd88d --name MY_SECRETS_STORE_SECRET --scopes workers --remote
758+
```
759+
760+
```sh output
761+
✓ Enter a secret value: › ***
762+
763+
🔐 Creating secret... (Name: MY_SECRETS_STORE_SECRET, Value: REDACTED, Scopes: workers, Comment: undefined)
764+
✓ Select an account: › My account
765+
✅ Created secret! (ID: 13bc7498c6374a4e9d13be091c3c65f1)
766+
```
745767

746768
### `update`
747769

748770
Update a secret within a store.
749771

750772
```txt
751-
wrangler secrets-store secret update <KEY> <STORE_ID>
773+
wrangler secrets-store secret update <STORE_ID>
752774
```
753775

754-
<Render file="wrangler-commands/secrets-store" product="workers" />
776+
755777

756778
### `duplicate`
757779

758780
Duplicate a secret within a store.
759781

760782
```txt
761-
wrangler secrets-store secret duplicate <KEY> <STORE_ID>
783+
wrangler secrets-store secret duplicate <STORE_ID>
762784
```
763785

764-
<Render file="wrangler-commands/secrets-store" product="workers" />
786+
765787

766788
### `get`
767789

768790
Get a secret within a store.
769791

770792
```txt
771-
wrangler secrets-store secret get <KEY> <STORE_ID>
793+
wrangler secrets-store secret get <STORE_ID>
772794
```
773-
<Render file="wrangler-commands/secrets-store" product="workers" />
795+
774796

775797
### `delete`
776798

@@ -781,9 +803,9 @@ Before deleting a secret, make sure it is not deployed in any Workers applicatio
781803
:::
782804

783805
```txt
784-
wrangler secrets-store secret delete <KEY> <STORE_ID>
806+
wrangler secrets-store secret delete <STORE_ID>
785807
```
786-
<Render file="wrangler-commands/secrets-store" product="workers" />
808+
787809

788810
### `list`
789811

src/content/partials/workers/wrangler-commands/secrets-store.mdx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,14 @@ import { Type, MetaInfo } from "~/components";
88
- `STORE_ID` <Type text="string" /> <MetaInfo text="required" />
99
- The secret store public ID. You can find it and copy from the [Secrets Store tab](https://dash.cloudflare.com/?to=/:account/secrets-store/) on the dashboard.
1010

11-
- `KEY` <Type text="string" /> <MetaInfo text="required" />
12-
- The name of the account-level secret on which you are using the command.
11+
- `--name` <Type text="string" /> <MetaInfo text="required" />
12+
- A descriptive name for the account-level secret.
13+
14+
- `--scopes` <Type text="string" /> <MetaInfo text="required" />
15+
- Which services will have access to the account-level secret.
16+
17+
- `--comment` <Type text="string" /> <MetaInfo text="optional" />
18+
- Additional information about the account-level secret.
19+
20+
- `--remote` <Type text="boolean" /> <MetaInfo text="(default: false) optional" />
21+
- Execute the command against the remote Secrets Store. To interact with account-level secrets in production, make sure to append `--remote` to your commands.

0 commit comments

Comments
 (0)