Skip to content

Add support for WVPC TCP services, and using them as Hyperdrive origins#12874

Merged
petebacondarwin merged 7 commits intocloudflare:mainfrom
xortive:malonso/wvpc-tcp-hyperdrive
Mar 26, 2026
Merged

Add support for WVPC TCP services, and using them as Hyperdrive origins#12874
petebacondarwin merged 7 commits intocloudflare:mainfrom
xortive:malonso/wvpc-tcp-hyperdrive

Conversation

@xortive
Copy link
Copy Markdown
Contributor

@xortive xortive commented Mar 12, 2026

Fixes WVPC-145

Adds support for WVPC TCP services, and using them as Hyperdrive origins---

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@xortive xortive requested a review from a team as a code owner March 12, 2026 23:29
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 12, 2026

🦋 Changeset detected

Latest commit: 100cf28

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

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
Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • packages/wrangler/src/tests/hyperdrive.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/vpc.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/hyperdrive/client.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/hyperdrive/index.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/create.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/get.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/index.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/shared.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/update.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/validation.ts: [@cloudflare/wrangler]

Copy link
Copy Markdown
Contributor

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

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 3 additional findings.

Open in Devin Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 12, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 100cf28

@penalosa penalosa force-pushed the malonso/wvpc-tcp-hyperdrive branch from 4e70637 to 86d3d84 Compare March 18, 2026 22:40
@workers-devprod
Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • packages/wrangler/src/tests/hyperdrive.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/vpc.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/hyperdrive/client.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/hyperdrive/index.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/create.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/get.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/index.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/shared.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/update.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/validation.ts: [@cloudflare/wrangler]

devin-ai-integration[bot]

This comment was marked as resolved.

@xortive xortive force-pushed the malonso/wvpc-tcp-hyperdrive branch from 86d3d84 to 3ab6d8e Compare March 24, 2026 21:42
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 24, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@xortive xortive force-pushed the malonso/wvpc-tcp-hyperdrive branch from 4868d50 to 89da13c Compare March 24, 2026 22:19
devin-ai-integration[bot]

This comment was marked as resolved.

@xortive xortive force-pushed the malonso/wvpc-tcp-hyperdrive branch 2 times, most recently from 7d0baba to 86878c7 Compare March 25, 2026 19:01
xortive added 4 commits March 25, 2026 14:01
Add support for creating TCP services in Workers VPC using the
`--type tcp` option. This enables exposing TCP-based services like
PostgreSQL, MySQL, and other database servers through Workers VPC.

Changes:
- Add ServiceType.Tcp enum value and --tcp-port CLI option
- Add validation requiring --tcp-port for TCP service type
- Update create/update/get commands to display TCP port
- Update list command to show TCP port in table (TCP:<port>)
- Add comprehensive tests for TCP service CRUD operations
Add support for connecting Hyperdrive configs to databases through
Workers VPC services using the `--service-id` option. This enables
Hyperdrive to connect to databases hosted in private networks that
are accessible through Workers VPC TCP services.

Changes:
- Add --service-id CLI option for hyperdrive create/update commands
- Add NetworkOriginVpcService type for VPC service connections
- Add conflict validation between --service-id and other origin options
- Update mock API handlers to support service_id in origin
- Add comprehensive tests including error case coverage
… helper

Extract duplicated service detail display logic from create.ts, update.ts,
and get.ts into a shared displayServiceDetails() function in shared.ts.
Also adds missing null guard for tcp_port, consistent with get.ts and
formatServiceForTable.
Support specifying an application protocol (postgresql or mysql) when
creating or updating TCP VPC services. The protocol is displayed in
service details and appended to the ports column in list tables.
@xortive xortive force-pushed the malonso/wvpc-tcp-hyperdrive branch from 86878c7 to 9fb9937 Compare March 25, 2026 19:01
devin-ai-integration[bot]

This comment was marked as resolved.

Add TLS certificate verification mode configuration to wrangler vpc
service create/update commands. This maps to the new tls_settings field
on the connectivity directory API, allowing users to control how the
connection to the origin verifies TLS certificates.

Available modes: verify_full (default), verify_ca, disabled.
Applies to both TCP and HTTP VPC service types.
@xortive xortive force-pushed the malonso/wvpc-tcp-hyperdrive branch from 8eb487b to b41fb17 Compare March 25, 2026 21:35
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 25, 2026
xortive added 2 commits March 25, 2026 17:05
For TCP services, allow specifying the port as part of the hostname
(e.g. --hostname db.internal:5432) instead of requiring a separate
--tcp-port flag. Uses the URL class for reliable host:port parsing.

Also refactors command handlers to use a shared toServiceArgs() helper,
eliminating duplicated args-object construction between validateArgs
and handler.
Copy link
Copy Markdown
Contributor

@thomasgauvin thomasgauvin left a comment

Choose a reason for hiding this comment

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

LGTM

@petebacondarwin petebacondarwin merged commit 53ed15a into cloudflare:main Mar 26, 2026
54 of 55 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 26, 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.

5 participants