Skip to content

Add Cloudflare billing flags to pscale database create - #1311

Draft
nholden wants to merge 2 commits into
mainfrom
cursor/cloudflare-billed-db-create-e787
Draft

Add Cloudflare billing flags to pscale database create#1311
nholden wants to merge 2 commits into
mainfrom
cursor/cloudflare-billed-db-create-e787

Conversation

@nholden

@nholden nholden commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

Extends pscale database create so agents can create Cloudflare-billed databases by passing a Cloudflare-minted HMAC billing proof.

pscale database create <database> --org <org> --format json \
  --cloudflare-account-id <id> \
  --cloudflare-timestamp <unix> \
  --cloudflare-signature <hex>

All three flags are required together. The CLI does not mint the signature — Cloudflare must provide it (same HMAC as the browser entry URL).

Depends on the matching api-bb change that accepts these fields on POST /v1/organizations/:org/databases.

Test plan

  • go test ./internal/cmd/database/ ./internal/planetscale/
  • End-to-end against api-bb with a valid Cloudflare HMAC grant
Open in Web Open in Cursor 

cursoragent and others added 2 commits July 27, 2026 14:45
Allow agents to create Cloudflare-billed databases by passing
--cloudflare-account-id, --cloudflare-timestamp, and --cloudflare-signature
together on `pscale database create`.

Co-authored-by: nick.holden <nick.holden@planetscale.com>
Co-authored-by: nick.holden <nick.holden@planetscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants