Skip to content

Cloudflare Resource Transition

Corporate Cloudflare Platform Resource Transition & Foundation Provisioning

Source Issue: #523 (Epic #790: Corporate Cloudflare Platform Activation & Resource Transition)
Status: distilled (Distilled into living runbook docs/runbooks/CLOUDFLARE_RESOURCE_CUTOVER.md)


1. Context & Objective

SiteSwarm originally operated under the founder’s personal Cloudflare account (jacobmiller22.com). Following the onboarding of the authoritative corporate zone jpsoftwareassociates.com (#521) and activation of the Workers Paid plan with the corporate jpsoftwareassociates.workers.dev subdomain (#522), all platform resources, foundational stateful storage, and CI/CD pipelines must transition to the corporate Cloudflare account (Jpsoftwareassociates@gmail.com's Account / Account ID 7fba1ed07b005a3c31a890fe6c20cda2).

This write-up documents the live provisioning of foundational Cloudflare D1 databases on the corporate account, empirical health attestation, the removal of legacy subdomain defaults from CI workflows, and the distillation of the complete cutover and decommissioning procedure.


2. Technical Findings & Empirical Outputs

2.1 Foundational Corporate D1 Database Provisioning

The foundational databases for horizontal platform microservices were provisioned in region ENAM via npx wrangler d1 create:

Database Name Canonical UUID Region Binding Target
siteswarm-inquiries-db 74f5c1c1-209a-4eb3-a579-1d040ac7e799 ENAM services/inquiries (INQUIRIES_DB)
siteswarm-events-db d314e7b5-a9c4-4d09-8d8f-a1e67c88b99a ENAM services/event-platform (EVENT_DB)
siteswarm-critique-db af4ca8e6-b298-407a-8785-d5b3acc66cd5 ENAM services/critique (CRITIQUE_DB)
siteswarm-cache-purge-db c72e53b0-7f80-4578-9daa-688ba123274f ENAM services/cache-purge (DB)

2.2 Empirical Database Verification & Health Attestation

Live enumeration via npx wrangler d1 list under the corporate account returned exit code 0 with all 4 instances active:

┌──────────────────────────────────────┬──────────────────────────┬──────────────────────────┬────────────┬────────────┬───────────┬──────────────┐
│ uuid │ name │ created_at │ version │ num_tables │ file_size │ jurisdiction │
├──────────────────────────────────────┼──────────────────────────┼──────────────────────────┼────────────┼────────────┼───────────┼──────────────┤
│ c72e53b0-7f80-4578-9daa-688ba123274f │ siteswarm-cache-purge-db │ 2026-11-11T03:21:34.634Z │ production │ 0 │ 8192 │ │
├──────────────────────────────────────┼──────────────────────────┼──────────────────────────┼────────────┼────────────┼───────────┼──────────────┤
│ af4ca8e6-b298-407a-8785-d5b3acc66cd5 │ siteswarm-critique-db │ 2026-11-11T03:21:30.895Z │ production │ 0 │ 8192 │ │
├──────────────────────────────────────┼──────────────────────────┼──────────────────────────┼────────────┼────────────┼───────────┼──────────────┤
│ d314e7b5-a9c4-4d09-8d8f-a1e67c88b99a │ siteswarm-events-db │ 2026-11-11T03:21:27.504Z │ production │ 0 │ 8192 │ │
├──────────────────────────────────────┼──────────────────────────┼──────────────────────────┼────────────┼────────────┼───────────┼──────────────┤
│ 74f5c1c1-209a-4eb3-a579-1d040ac7e799 │ siteswarm-inquiries-db │ 2026-11-11T03:21:23.851Z │ production │ 0 │ 8192 │ │
└──────────────────────────────────────┴──────────────────────────┴──────────────────────────┴────────────┴────────────┴───────────┴──────────────┘

Remote query execution (npx wrangler d1 execute <name> --remote --command "SELECT 1 as alive;") confirmed clean remote responsiveness (100% pass across all 4 databases):

🚣 Executed 1 command in 0.50ms
┌───────┐
│ alive │
├───────┤
│ 1 │
└───────┘

2.3 Elimination of Legacy Domain Defaults in CI Workflows

Legacy fallback references to jacobmillerdev.workers.dev in GitHub Actions deployment workflows were updated to target the canonical corporate subdomain:

  • .github/workflows/preview-deploy.yml: Default fallback updated to jpsoftwareassociates.workers.dev.
  • .github/workflows/staging-deploy.yml: Default fallback updated to jpsoftwareassociates.workers.dev.
  • .github/workflows/production-promote.yml: Default fallback updated to jpsoftwareassociates.workers.dev.

2.4 Dual-Tier API Token Security & Secret Rotation Guide

Codified least-privilege token permissions (Workers Scripts:Edit, Workers Routes:Edit, Workers KV:Edit, D1:Edit, R2:Edit, Browser Rendering:Edit, Account Settings:Read, Zone Settings:Read) and documented rotation commands via gh secret set for:

  • CLOUDFLARE_ACCOUNT_ID (7fba1ed07b005a3c31a890fe6c20cda2)
  • CLOUDFLARE_API_TOKEN
  • R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_ENDPOINT
  • CF_WORKERS_DOMAIN (jpsoftwareassociates.workers.dev)

3. Canonical Targets Distilled

The findings, database registry, configuration snippets, and decommissioning checklist have been distilled into:


4. Decisions Intentionally Deferred

  • Active Commercial Client Domain Migrations: External registrar DNS record modifications for client custom domains are scheduled in dedicated client wave stories.
  • Legacy Account Asset Deletion: Decommissioning personal account D1 databases and Worker scripts follows the mandatory 72-hour dual-run observation window codified in the runbook.