Skip to content

[wrangler] Support jurisdictions for KV namespaces - #14807

Merged
edmundhung merged 6 commits into
cloudflare:mainfrom
oOPa:KV-2108
Jul 27, 2026
Merged

[wrangler] Support jurisdictions for KV namespaces #14807
edmundhung merged 6 commits into
cloudflare:mainfrom
oOPa:KV-2108

Conversation

@oOPa

@oOPa oOPa commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

KV-2108

Adds jurisdiction support for KV namespaces in two places:

  1. wrangler kv namespace create --jurisdiction <us|eu|fedramp> — a hidden flag
    that creates a KV namespace scoped to a specific jurisdiction. Hidden from
    --help because the feature is currently gated to allow-listed accounts
    server-side.

  2. An optional jurisdiction field on kv_namespaces bindings in wrangler.jsonc


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: experimental/hidden feature gated to allow-listed accounts; docs can be added when the feature is GA

@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@14807

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@14807

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@14807

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@14807

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@14807

miniflare

npm i https://pkg.pr.new/miniflare@14807

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@14807

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@14807

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@14807

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@14807

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@14807

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@14807

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@14807

wrangler

npm i https://pkg.pr.new/wrangler@14807

commit: 92c6c39

@oOPa
oOPa marked this pull request as ready for review July 22, 2026 17:16
@oOPa
oOPa requested a review from workers-devprod as a code owner July 22, 2026 17:16
@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 92c6c39

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@workers-devprod
workers-devprod requested review from a team and edmundhung and removed request for a team July 22, 2026 17:17
@workers-devprod

workers-devprod commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/workers-kv
  • ✅ @cloudflare/wrangler
Show detailed file reviewers
  • packages/wrangler/src/tests/kv/namespace.test.ts: [@cloudflare/workers-kv]
  • packages/wrangler/src/kv/helpers.ts: [@cloudflare/workers-kv]
  • packages/wrangler/src/kv/index.ts: [@cloudflare/workers-kv]

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Comment thread packages/wrangler/src/kv/index.ts
Comment thread .changeset/kv-namespace-create-jurisdiction.md Outdated

@edmundhung edmundhung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests pass. So I think the SDK did pass the jurisdiction flag to the API correctly.

Comment thread packages/wrangler/src/__tests__/kv/namespace.test.ts
@github-project-automation github-project-automation Bot moved this from Untriaged to In Review in workers-sdk Jul 23, 2026

@emily-shen emily-shen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't feel strongly either way, but r2 jurisdiction is a config option too - is that something we should have here too?

@oOPa

oOPa commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@emily-shen adding it now

@oOPa oOPa changed the title [wrangler] Add --jurisdiction flag to kv namespace create [wrangler] Support jurisdictions for KV namespaces Jul 24, 2026
@oOPa
oOPa requested a review from edmundhung July 27, 2026 09:58
Comment thread .changeset/kv-namespace-provision-jurisdiction.md
Enyinna Ogwe and others added 6 commits July 27, 2026 16:38
…the jurisdiction flag is hidden rather than experimental

Co-authored-by: Edmund Hung <me@edmund.dev>
…at the jurisdiction flag is experimental and gated to allowed accounts only

Co-authored-by: Edmund Hung <me@edmund.dev>
@edmundhung
edmundhung enabled auto-merge (squash) July 27, 2026 17:23

@teresalves teresalves left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KV team here - LGTM

@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/workers-kv
  • ✅ @cloudflare/wrangler
Show detailed file reviewers
  • packages/wrangler/src/tests/kv/namespace.test.ts: [@cloudflare/workers-kv]
  • packages/wrangler/src/kv/helpers.ts: [@cloudflare/workers-kv]
  • packages/wrangler/src/kv/index.ts: [@cloudflare/workers-kv]

@edmundhung edmundhung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@teresalves You might wanna ask the team admin of @cloudflare/workers-kv to add you in the team. I will bypass the check for the CI for now :)

Codeowners Bypass

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@edmundhung
edmundhung merged commit 4dfb96e into cloudflare:main Jul 27, 2026
59 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Approved in workers-sdk Jul 27, 2026
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants