Skip to content

Commit 610c197

Browse files
Cross-link Workers docs and clarify per-Worker vs account-level
1 parent f6dd29f commit 610c197

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

src/content/docs/workers/configuration/environment-variables.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ To add environment variables via the dashboard:
9090
8. Select **Deploy** to implement your changes.
9191

9292
:::caution[Plaintext strings and secrets]
93-
94-
Select the **Secret** type if your environment variable is a [secret](/workers/configuration/secrets/).
95-
93+
Select the **Secret** type if your environment variable is a [secret](/workers/configuration/secrets/). Alternatively, consider [Cloudflare Secrets Store](/secrets-store/), for account-level secrets.
9694
:::
9795

9896
<Render file="env_and_secrets" />

src/content/docs/workers/configuration/secrets.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import { Render } from "~/components";
1111

1212
Secrets are a type of binding that allow you to attach encrypted text values to your Worker. You cannot see secrets after you set them and can only access secrets via [Wrangler](/workers/wrangler/commands/#secret) or programmatically via the [`env` parameter](/workers/runtime-apis/handlers/fetch/#parameters). Secrets are used for storing sensitive information like API keys and auth tokens. Secrets are available on the [`env` parameter](/workers/runtime-apis/handlers/fetch/#parameters) passed to your Worker's [`fetch` event handler](/workers/runtime-apis/handlers/fetch/).
1313

14+
:::note[Secrets Store (beta)]
15+
Secrets described on this page are defined and managed on a per-Worker level. If you want to use account-level secrets, refer to [Secrets Store](/secrets-store/). Account-level secrets are configured on your Worker as a [Secrets Store binding](/secrets-store/integrations/workers/).
16+
:::
17+
1418
## Local Development with Secrets
1519

1620
<Render file="secrets-in-dev" />
@@ -86,3 +90,4 @@ To delete a secret from your Worker project via the dashboard:
8690
## Related resources
8791

8892
- [Wrangler secret commands](/workers/wrangler/commands/#secret) - Review the Wrangler commands to create, delete and list secrets.
93+
- [Cloudflare Secrets Store](/secrets-store/) - Encrypt and store sensitive information as secrets that are securely reusable across your account.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
pcx_content_type: navigation
3+
title: Secrets Store (Beta)
4+
external_link: /secrets-store/integrations/workers/
5+
head: []
6+
description: Account-level secrets that can be added to Workers applications as a binding.
7+
8+
---

src/content/partials/workers/env_and_secrets.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
## Compare secrets and environment variables
77

88
:::caution[Use secrets for sensitive information]
9-
10-
11-
Do not use plaintext environment variables to store sensitive information. Use [secrets](/workers/configuration/secrets/) instead.
12-
13-
9+
Do not use plaintext environment variables to store sensitive information. Use [secrets](/workers/configuration/secrets/) or [Secrets Store bindings](/secrets-store/integrations/workers/) instead.
1410
:::
1511

1612
[Secrets](/workers/configuration/secrets/) are [environment variables](/workers/configuration/environment-variables/). The difference is secret values are not visible within Wrangler or Cloudflare dashboard after you define them. This means that sensitive data, including passwords or API tokens, should always be encrypted to prevent data leaks. To your Worker, there is no difference between an environment variable and a secret. The secret's value is passed through as defined.

0 commit comments

Comments
 (0)