You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/secrets-store/integrations/workers.mdx
+17-11Lines changed: 17 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,18 +14,19 @@ This is different from Workers [Variables and Secrets](/workers/configuration/se
14
14
15
15
## Before you begin
16
16
17
-
If [using the Dashboard](#option-b-use-the-dashboard), make sure you already have a Workers application. Refer to [Get started](/workers/get-started/dashboard/) for guidance.
17
+
If [using the Dashboard](#option-b-via-dashboard), make sure you already have a Workers application. Refer to [Get started](/workers/get-started/dashboard/) for guidance.
18
18
19
19
## 1. Set up account secrets in Secrets Store
20
20
21
21
If there are no account secrets yet, follow the steps below. You must have a (TBC) [Super Administrator or a Secrets Store Admin role](/secrets-store/access-control/) within your Cloudflare account.
22
22
23
-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
24
-
2. Go to **Secrets Store** and select **Create secret**.
25
-
3. Fill in the required fields, choosing _Workers_ as the **Permission scope**.
26
23
:::note
27
-
Once the secret is saved, the secret value will no longer be available for viewing.
24
+
You may also add account secrets directly from the Workers settings on the dashboard. You can skip to [step 2](#option-b-via-dashboard) to do that.
28
25
:::
26
+
27
+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
28
+
2. Go to **Secrets Store** and select **Create secret**.
29
+
3. Fill in the required fields, choosing _Workers_ as the **Permission scope**. Once the secret is saved, the secret value will no longer be available for viewing.
29
30
4. (Optional) Select **Add additional secret** to create more than one secret at a time.
30
31
5. Select **Save** to confirm
31
32
@@ -38,15 +39,20 @@ Refer to [manage account secrets](/secrets-store/manage-secrets/) for further op
38
39
- Secrets Store Admin
39
40
- Secrets Store Deploy
40
41
41
-
### Option A: use the CLI
42
+
### Option A: via Wrangler
42
43
43
-
### Option B: use the Dashboard
44
+
### Option B: via Dashboard
44
45
45
46
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
46
-
2. Go to **Workers & Pages** and select the Workers application where you want ro use account secrets.
47
-
3.Got to **Settings** > **Bindings** and select **Add**.
47
+
2. Go to **Workers & Pages** and select a Workers application.
48
+
3.Go to **Settings** > **Bindings** and select **Add**.
48
49
4. On the **Add a resource binding** side panel, choose **Secrets Store**.
49
-
5. Select the **Secret name** from the list of available account secrets (created in [step 1](#1-set-up-account-secrets-in-secrets-store)).
50
-
6. Select **Deploy** to confirm.
50
+
5. Fill in the required fields:
51
+
-**Variable name**: a name for the binding. This will be used for your worker to access the secret ([step 3](#3-access-the-secret-on-the-env-object) below).
52
+
-**Secret name**: select from the list of available account secrets created in [step 1](#1-set-up-account-secrets-in-secrets-store).
53
+
- (Optional - Admins only) If the secret you need does not exist yet, select **Create secret**. This will add an account level secret in the same way as if you had [created it on the Secrets Store](/secrets-store/manage-secrets/).
54
+
6. Select **Deploy** to deploy your binding. When deploying, there are two options:
55
+
-**Deploy:** Immediately deploy the binding to 100% of your audience.
56
+
-**Save version:** Save a version of the binding which you can deploy in the future.
0 commit comments