Skip to content

[wrangler] Add vpc_networks binding support#12992

Merged
edmundhung merged 4 commits intocloudflare:mainfrom
RiscadoA:rantunes/WVPC-172-phase1
Apr 1, 2026
Merged

[wrangler] Add vpc_networks binding support#12992
edmundhung merged 4 commits intocloudflare:mainfrom
RiscadoA:rantunes/WVPC-172-phase1

Conversation

@RiscadoA
Copy link
Copy Markdown
Contributor

@RiscadoA RiscadoA commented Mar 20, 2026

Fixes WVPC-172.

Adds vpc_networks binding support, allowing Workers to route traffic through a Cloudflare Tunnel. At runtime, env.MY_VPC.fetch("http://internal-host/") routes through the tunnel. Each binding generates a Fetcher type. Like vpc_services, these bindings are always remote in wrangler dev.

Network bindings are configured through either a tunnel_id or a network_id:

{
  "vpc_networks": [{ "binding": "MY_FOO_VPC", "tunnel_id": "your-tunnel-uuid" }]
}
{
  "vpc_networks": [{ "binding": "MY_BAR_VPC", "network_id": "some-network-id" }]
}


Open with Devin

@RiscadoA RiscadoA force-pushed the rantunes/WVPC-172-phase1 branch from b0de6cb to 3fac7aa Compare March 20, 2026 16:00
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 20, 2026

🦋 Changeset detected

Latest commit: 3bd1f9c

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

@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Mar 20, 2026
@RiscadoA RiscadoA force-pushed the rantunes/WVPC-172-phase1 branch 8 times, most recently from ba592eb to 9d6de13 Compare March 25, 2026 18:33
@RiscadoA RiscadoA marked this pull request as ready for review March 25, 2026 18:34
@RiscadoA RiscadoA requested a review from a team as a code owner March 25, 2026 18:34
@RiscadoA RiscadoA requested a review from edmundhung March 25, 2026 18:34
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 25, 2026

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • packages/miniflare/src/plugins/index.ts: [@cloudflare/wrangler]
  • packages/miniflare/src/plugins/vpc-networks/index.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/config.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/environment.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/validation.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/map-worker-metadata-bindings.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/types.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/worker.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tests/config/validation/normalize-and-validate-config.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/e2e/remote-binding/miniflare-remote-resources.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/e2e/remote-binding/workers/vpc-network.js: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/api/startDevWorker/utils.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/deploy/durable-objects.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/deploy/get-remote-config-diff.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/type-generation.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/api/remoteBindings/index.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/api/startDevWorker/utils.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/deploy/check-remote-secrets-override.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/deploy/config-diffs.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/deployment-bundle/create-worker-upload-form.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/dev/miniflare/index.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/type-generation/index.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/utils/print-bindings.ts: [@cloudflare/wrangler]

devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 25, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 3bd1f9c

@RiscadoA RiscadoA force-pushed the rantunes/WVPC-172-phase1 branch 2 times, most recently from ec90908 to 2ef1741 Compare March 26, 2026 09:19
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

@RiscadoA RiscadoA force-pushed the rantunes/WVPC-172-phase1 branch 2 times, most recently from 315f520 to 3446b43 Compare March 27, 2026 10:34
devin-ai-integration[bot]

This comment was marked as resolved.

@RiscadoA RiscadoA force-pushed the rantunes/WVPC-172-phase1 branch from 3446b43 to 5209a58 Compare March 27, 2026 10:53
devin-ai-integration[bot]

This comment was marked as resolved.

workers-devprod pushed a commit that referenced this pull request Mar 31, 2026
workers-devprod pushed a commit that referenced this pull request Mar 31, 2026
@RiscadoA RiscadoA force-pushed the rantunes/WVPC-172-phase1 branch 2 times, most recently from ddb6fcb to 73d97df Compare April 1, 2026 10:12
workers-devprod pushed a commit that referenced this pull request Apr 1, 2026
@RiscadoA RiscadoA force-pushed the rantunes/WVPC-172-phase1 branch from 73d97df to 423217e Compare April 1, 2026 13:34
workers-devprod pushed a commit that referenced this pull request Apr 1, 2026
@RiscadoA RiscadoA force-pushed the rantunes/WVPC-172-phase1 branch from 423217e to 7134458 Compare April 1, 2026 14:01
devin-ai-integration[bot]

This comment was marked as resolved.

@RiscadoA RiscadoA force-pushed the rantunes/WVPC-172-phase1 branch from 7134458 to 6a0e2f4 Compare April 1, 2026 14:08
workers-devprod pushed a commit that referenced this pull request Apr 1, 2026
@xortive
Copy link
Copy Markdown
Contributor

xortive commented Apr 1, 2026

Approved from WVPC PoV

@edmundhung edmundhung force-pushed the rantunes/WVPC-172-phase1 branch from 6a0e2f4 to 3bd1f9c Compare April 1, 2026 15:03
Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Apr 1, 2026
@edmundhung edmundhung merged commit 48d83ca into cloudflare:main Apr 1, 2026
47 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Blocked on other work run-remote-tests

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants