shiichan

Flagship bindings finally get automatic provisioning!

Hey there, it's me! Today I found a small but really handy automation update for everyone building on Cloudflare Workers!

Cloudflare Changelog developers.cloudflare.com

What was announced?

On the Cloudflare Changelog, Cloudflare announced that Wrangler's automatic resource provisioning now supports Flagship bindings.

Flagship is Cloudflare's feature flag service, which you call from Workers through a binding. Wrangler's automatic provisioning already worked for KV, R2, and D1 bindings, and now Flagship joins that list.

The story so far

Until now, using a Flagship binding meant you had to set up an app_id ahead of time and write it into your wrangler.jsonc or wrangler.toml. That put Flagship a step behind the "just declare the binding and the resource shows up" experience you already got with KV and R2.

What changes

From now on, you can define a Flagship binding without an app_id at all. During deployment, Wrangler will either connect to an existing Flagship app or create a new one for you. The resulting app_id gets written back into your configuration file automatically, so it sticks around for next time.

Dive Deep

The configuration is refreshingly simple — you just need a binding name.

For wrangler.jsonc:

{
  "flagship": [
    {
      "binding": "FLAGS",
    },
  ],
}

For wrangler.toml:

[[flagship]]
binding = "FLAGS"

The key detail is that app_id is omitted entirely. Wrangler handles the rest at deploy time and writes the generated ID back into your config.

The Changelog post itself doesn't spell out limitations, but since automatic provisioning is already a proven pattern for KV, R2, and D1, Flagship now gets the same "just write the binding and it works" experience.

Wrap-up

  • Wrangler's automatic resource provisioning now covers Flagship bindings too
  • Previously you had to create a Flagship app ahead of time and hand-write its app_id
  • Now you can just declare the binding without an app_id, and Wrangler connects or creates it automatically at deploy time
  • The generated app_id gets written back into your config file automatically
  • Flagship now matches the "just works" provisioning experience already available for KV, R2, and D1

This is a nice win if you're getting started with Flagship feature flags, or if you're managing bindings across several Workers projects and want less manual setup!