Secret
Source:
src/Cloudflare/SecretsStore/Secret.ts
A single secret stored inside a Cloudflare Secrets Store.
The secret value is treated as redacted and is only ever sent to
Cloudflare at create time. Updating scopes or comment issues a
PATCH; changing value or name replaces the secret.
Creating a Secret
Section titled “Creating a Secret”const store = yield* Cloudflare.SecretsStore("MyStore");const apiKey = yield* Cloudflare.StoreSecret("ApiKey", { store, value: Redacted.make(process.env.API_KEY!),});Binding to a Worker
Section titled “Binding to a Worker”const apiKey = yield* Cloudflare.StoreSecret.bind(ApiKey);// `apiKey` is itself an Effect that resolves to the secret value:const value = yield* apiKey;// Or call `.get()` explicitly:const value = yield* apiKey.get();