Skip to content

Support named lookups for VPC Service IDs#13387

Draft
sodabrew wants to merge 6 commits intocloudflare:mainfrom
sodabrew:vpc-service-name-binding
Draft

Support named lookups for VPC Service IDs#13387
sodabrew wants to merge 6 commits intocloudflare:mainfrom
sodabrew:vpc-service-name-binding

Conversation

@sodabrew
Copy link
Copy Markdown

@sodabrew sodabrew commented Apr 9, 2026

Fixes #13211

Today, we have to copy vpc service ids from the Cloudflare Dashboard or use an automation tool like terraform to look up the id and emit it to stdout, and a delete-and-recreate means copying a new ID. This PR proposes a config option to use the friendly name of the vpc service and look up its id at deploy time:

New, can use service_name:

  {
    "vpc_services": [
      { "binding": "API_FOO", "service_name": "api-foo" }
    ]
  }

Existing, can only use service_id:

  {
    "vpc_services": [
      { "binding": "API_FOO", "service_id": "0199295b-b3ac-7760-8246-bca40877b3e9" }
    ]
  }

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because:

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


Open with Devin

…service_id

VPC service bindings can now specify `service` (a human-readable name)
instead of `service_id` (a UUID). Wrangler resolves the name to a
service_id via the Cloudflare API at deploy/dev time. The two fields
are mutually exclusive.

Closes cloudflare#13211
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 9, 2026

🦋 Changeset detected

Latest commit: 16a107e

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 workers-devprod requested review from a team and jamesopstad and removed request for a team April 9, 2026 19:36
@workers-devprod
Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • packages/workers-utils/src/config/environment.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/validation.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/worker.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/api/startDevWorker/ConfigController.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/deploy/deploy.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/deployment-bundle/create-worker-upload-form.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/utils/print-bindings.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/versions/upload.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/vpc/client.ts: [@cloudflare/wrangler]

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

sodabrew and others added 2 commits April 9, 2026 14:46
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@jamesopstad
Copy link
Copy Markdown
Contributor

Thanks for the PR. I'm going to move to draft as it shouldn't be reviewed until #13211 has progressed.

@jamesopstad jamesopstad marked this pull request as draft April 10, 2026 10:34
@jamesopstad jamesopstad removed their request for review April 10, 2026 10:34
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.

3 participants