Cloudflare Workers KV Pair

Write a single key-value entry into a Workers KV namespace as a managed, composable resource.

What Gets Created

  • A cloudflare_workers_kv entry (key + value, optional JSON metadata) inside an existing KV namespace.

Prerequisites

  • A Cloudflare account ID.
  • An existing Workers KV namespace (a CloudflareKvNamespace) to write into.

Configuration Reference

Required

  • accountId — Cloudflare account ID.
  • namespaceId — KV namespace ID, or a reference to a CloudflareKvNamespace.
  • keyName — the entry key (≤512 bytes).
  • value — the value (≤25 MiB).

Optional

  • metadata — arbitrary JSON returned with the value on read.

Stack Outputs

OutputDescription
key_nameThe entry's key name
namespace_idThe namespace ID written to
  • CloudflareKvNamespace
  • CloudflareWorker

Next article

Cloudflare Zero Trust Access Application

Cloudflare Zero Trust Access Application Put Cloudflare Access in front of any resource — a web app, SaaS app, SSH/RDP target, app launcher, or MCP endpoint. A Cloudflare Zero Trust Access application is the protected resource Access guards. It binds reusable Access policies (by reference) to the resource and configures how users reach and authenticate to it — across self-hosted apps, federated SaaS (SAML/OIDC), infrastructure targets, and the 2026 agent-world MCP types. Highlights Full type...
Read next article