Skip to content

Commit cb4b161

Browse files
penalosaemily-shenlrapoport-cf
authored
Add changelog for experimental resource provisioning (#25962)
* Add changelog * Update src/content/changelog/workers/2025-10-24-automatic-resource-provisioning.mdx Co-authored-by: emily-shen <[email protected]> * feedback * Update src/content/changelog/workers/2025-10-24-automatic-resource-provisioning.mdx Co-authored-by: lrapoport-cf <[email protected]> * Update src/content/changelog/workers/2025-10-24-automatic-resource-provisioning.mdx Co-authored-by: lrapoport-cf <[email protected]> * Update 2025-10-24-automatic-resource-provisioning.mdx --------- Co-authored-by: emily-shen <[email protected]> Co-authored-by: lrapoport-cf <[email protected]>
1 parent ef3f1bc commit cb4b161

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Automatic resource provisioning for KV, R2, and D1
3+
description: Wrangler can now automatically provision KV, R2, and D1 resources when deploying your Worker
4+
products:
5+
- workers
6+
date: 2025-10-24
7+
---
8+
9+
import { Render, TypeScriptExample, WranglerConfig } from "~/components";
10+
11+
Previously, if you wanted to develop or deploy a worker with attached resources, you'd have to first manually create the desired resources. Now, if your Wrangler configuration file includes a KV namespace, D1 database, or R2 bucket that does not yet exist on your account, you can develop locally and deploy your application seamlessly, without having to run additional commands.
12+
13+
Automatic provisioning is launching as an open beta, and we'd love to hear your feedback to help us make improvements! It currently works for KV, R2, and D1 bindings. You can disable the feature using the `--no-x-provision` flag.
14+
15+
To use this feature, update to [email protected] and add bindings to your config file _without_ resource IDs e.g.:
16+
17+
```jsonc
18+
{
19+
"kv_namespaces": [{ "binding": "MY_KV" }],
20+
"d1_databases": [{ "binding": "MY_DB" }],
21+
"r2_buckets": [{ "binding": "MY_R2" }],
22+
}
23+
```
24+
25+
`wrangler dev` will then automatically create these resources for you locally, and on your next run of `wrangler deploy`, Wrangler will call the Cloudflare API to create the requested resources and link them to your Worker.
26+
27+
Though resource IDs will be automatically written back to your Wrangler config file after resource creation, resources will stay linked across future deploys even without adding the resource IDs to the config file. This is especially useful for shared templates, which now no longer need to include account-specific resource IDs when adding a binding.

src/content/docs/workers/runtime-apis/bindings/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { DirectoryListing, WranglerConfig } from "~/components";
1212

1313
Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform. Bindings provide better performance and less restrictions when accessing resources from Workers than the [REST APIs](/api/) which are intended for non-Workers applications.
1414

15-
The following bindings available today:
15+
The following bindings are available today:
1616

1717
<DirectoryListing />
1818

0 commit comments

Comments
 (0)