Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(docs): update Cloudflare Secrets Store sync documentation for clarity and remove outdated steps

Dimitris Staratzis242dbc9cb38f
diff --git a/docs/integrations/secret-syncs/cloudflare-secrets-store.mdx b/docs/integrations/secret-syncs/cloudflare-secrets-store.mdx
index 6252f7a1aa..71baac5aeb 100644
--- a/docs/integrations/secret-syncs/cloudflare-secrets-store.mdx
+++ b/docs/integrations/secret-syncs/cloudflare-secrets-store.mdx
@@ -6,13 +6,16 @@ description: "Learn how to configure a Cloudflare Secrets Store sync for Infisic
A Cloudflare Secrets Store Sync pushes secrets from Infisical into your Cloudflare account's [Secrets Store](https://developers.cloudflare.com/secrets-store/), where Workers, AI Gateway, and Containers can use them. Each Infisical secret becomes a Secrets Store secret, with the same name unless you customize key names to add a prefix or suffix.
+<Note>
+ The Cloudflare Secrets Store Sync requires a [Cloudflare app connection](/integrations/app-connections/cloudflare#cloudflare-secrets-store) whose API token has the Secrets Store permissions.
+</Note>
+
## Prerequisites
- A [project with secrets configured](/documentation/platform/secrets-mgmt/quick-starts/deliver-first-secret)
-- A [Cloudflare app connection](/integrations/app-connections/cloudflare) whose API token has the **Account** > **Secrets Store** > **Edit** and **Account** > **Account Settings** > **Read** permissions
- A store in your Cloudflare account (Cloudflare creates it the first time a Super Administrator or Secrets Store Admin opens **Secrets Store** in the Cloudflare dashboard)
-## Step 1: Set up the sync in Infisical
+## Set up the sync in Infisical
<Tip>
To create the sync using the API, use the [Create Cloudflare Secrets Store Sync](/api-reference/endpoints/secret-syncs/cloudflare-secrets-store/create) endpoint.
@@ -52,7 +55,7 @@ A Cloudflare Secrets Store Sync pushes secrets from Infisical into your Cloudfla
- **Scopes**: The Cloudflare products allowed to use the synced secrets: **Workers**, **AI Gateway**, or **Containers** (defaults to **Workers**)
<Note>
- Infisical sets these scopes on every secret it writes, each time the sync runs. If you change a synced secret's scopes in Cloudflare, the next sync changes them back, and if you remove a scope from the sync, every secret the sync manages loses that scope. To give some secrets different scopes, sync them from another folder with a second sync, and customize key names on both syncs with prefixes that don't overlap, such as `WORKERS_{{secretKey}}` and `GATEWAY_{{secretKey}}`. Without separate prefixes, each sync treats the other's secrets as its own, and deletes them if **Prevent secret deletion** is off. If your organization has **Unique Secret Sync Destination Policy** turned on, Infisical rejects the second sync, because both syncs write to the same store.
+ Infisical applies these scopes every time it syncs, so if you remove a scope from the sync, every secret the sync manages loses that scope.
</Note>
![Configure Destination](/images/secret-syncs/cloudflare-secrets-store/configure-destination.png)
@@ -108,31 +111,6 @@ A Cloudflare Secrets Store Sync pushes secrets from Infisical into your Cloudfla
</Step>
</Steps>
-## Step 2: Use the secrets in Cloudflare Workers
-
-A Worker can read a Secrets Store secret only through a binding in the Worker's configuration, and Infisical doesn't create bindings. After the first sync creates your secrets, add a binding for each secret the Worker uses. The secret must have the **Workers** scope, or Cloudflare rejects the binding when you deploy the Worker.
-
-<Steps>
- <Step>
- In the Cloudflare dashboard, open **Secrets Store** and copy the store ID.
- </Step>
- <Step>
- In the Worker's Wrangler configuration file, add an entry to `secrets_store_secrets` for each secret, then deploy the Worker:
-
- ```jsonc
- {
- "secrets_store_secrets": [
- { "binding": "API_KEY", "store_id": "<store-id>", "secret_name": "API_KEY" }
- ]
- }
- ```
-
- In the Worker's code, read the value with `await env.API_KEY.get()`.
- </Step>
-</Steps>
-
-To use the secrets with AI Gateway or Containers, see Cloudflare's [Secrets Store documentation](https://developers.cloudflare.com/secrets-store/).
-
## FAQ
<AccordionGroup>
@@ -140,7 +118,7 @@ To use the secrets with AI Gateway or Containers, see Cloudflare's [Secrets Stor
While Secrets Store is in open beta, a Cloudflare account can hold 100 Secrets Store secrets in total, including secrets that other syncs and tools created. Before writing anything, the sync checks whether its new secrets fit. If they don't fit, the sync fails without writing any secrets. Secrets that the sync removes are deleted only after the new secrets are created, so they still count toward the limit during that sync.
</Accordion>
<Accordion title="What happens when I rename a secret in Infisical?">
- Cloudflare can't rename a secret, so the sync creates a secret with the new name. If **Prevent secret deletion** is off, the sync then deletes the secret with the old name. Update the `secret_name` in any Worker binding that used the old name.
+ Cloudflare can't rename a secret, so the sync creates a secret with the new name. If **Prevent secret deletion** is off, the sync then deletes the secret with the old name. Update the `secret_name` in any [Worker binding](https://developers.cloudflare.com/secrets-store/integrations/workers/) that used the old name.
</Accordion>
</AccordionGroup>