Repository navigation
AA2: the KV namespace from Terraform - #3
Merged
Merged
Conversation
infra/terraform/cloudflare-kv, kv-redis-starter's root renamed for this product: one Workers KV namespace per environment, titled on the product's slug (namespace titles are unique per account), adopted rather than recreated when one with its title already exists, and its id and title lease-published as the WIRING_CLOUDFLARE_KV document the app's build renders into wrangler.jsonc. The KV binding holds the rate-limit windows and the share links; every expiry is the Worker's, per write. apps/web already waits for it (an enforced dependsOn on cloudflare-kv on a push to main, advisory on a pull request), so the product's merge plans the namespace's apply before the Worker's deploy, per environment: checked with `orun plan --trigger github-push-main --env stage` (cloudflare-kv, then web). The root validates with `terraform validate`. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019PcpNVpFBcbeiX3EHdXfmn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds
infra/terraform/cloudflare-kv, kv-redis-starter's root renamed for this product.WIRING_CLOUDFLARE_KV. The app's build renders it intowrangler.jsonc.KVbinding holds: the rate-limit windows (ratelimit:<ip>:<window>) and the share links (fragment:<id>). The Worker sets every expiry, per write.apps/webalready waits for it since AA1: an enforceddependsOnoncloudflare-kvon a push to main, advisory on a pull request.Checked:
terraform validatepasses.orun plan --trigger github-push-main --env stageplanscloudflare-kv.stage.terraform, thenweb.stage.verify-deploy, which depends on it.Generated by Claude Code