Skip to content

Conversation

@penalosa
Copy link
Contributor

No description provided.

@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/pcx-technical-writing, @kodster28, @cloudflare/wrangler, @cloudflare/workers-runtime-1

Copy link
Contributor

@emily-shen emily-shen left a comment

Choose a reason for hiding this comment

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

should we briefly mention the implication for template authors too?


When developing locally, you can interact with local versions of any KV, D1, R2 resources configured in your Wrangler configuration file, without having to include an id to existing resource

Once ready to deploy, run `npx wrangler deploy`. Cloudflare will automatically create the resources that do not exist and bind them to your worker. Future deployments will use the same created resources.
Copy link
Contributor

Choose a reason for hiding this comment

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

Bit nitpicky. Do we want to be clear here here that 'binding' here means writing the created resources to the configuration file. Could be an addition to the final sentence eg.

As part of this process, these bindings will be written to your wrangler configuration file. Future deployments of your worker will use these bindings.


import { Render, TypeScriptExample, WranglerConfig } from "~/components";

If your Wrangler configuration file includes a KV namespace, D1 database, or R2 bucket that does not yet exist on your account, you can still develop locally and deploy your application seamlessly, without having to run additional commands to create resources.
Copy link
Contributor

@lrapoport-cf lrapoport-cf Oct 21, 2025

Choose a reason for hiding this comment

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

maybe include a sentence that contrasts the before to the now, something like below (but could probably be made smoother):

Suggested change
If your Wrangler configuration file includes a KV namespace, D1 database, or R2 bucket that does not yet exist on your account, you can still develop locally and deploy your application seamlessly, without having to run additional commands to create resources.
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 still develop locally and deploy your application seamlessly, but without having to run additional commands first.

@@ -0,0 +1,33 @@
---
title: Automatic resource provisioning
Copy link
Contributor

@lrapoport-cf lrapoport-cf Oct 21, 2025

Choose a reason for hiding this comment

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

should we narrow to "Automatic resource provisioning for KV, D1, and R2" or maybe put the specific resources in the description?

@MattieTK
Copy link
Contributor

MattieTK commented Oct 21, 2025

should we briefly mention the implication for template authors too?

Emily makes a good point here; we have templates also that would benefit from updates as a result of this change which we could follow up with in another PR. eg. https://github.com/cloudflare/templates/tree/main/chanfana-openapi-template which would no longer require the database_id or the instructions to change it.

Happy to do this before/after we merge.

@penalosa penalosa force-pushed the penalosa/resource-provisioning-changelog branch from 189c976 to b4a007a Compare October 21, 2025 20:47

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.

Automatic provisioning is still experimental, but we're turning it on by default to make it easier to try out and test. It currently works for KV, R2, and D1 bindings. You can disable the feature using the `--no-x-provision` flag.
Copy link
Contributor

Choose a reason for hiding this comment

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

This sentence reads odd - it's experimental but also default?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I intuit the logic here

It can be default because it doesn't actually change anything if you have a configuration already

As a customer i still have questions though

  • if it's default behavior how can it also be experimental? Sounds like it is just default?
  • if I mess up and omit a KV namespace ID, and then deploy, can I inadvertently have a bad deployment?

I'm guessing we have answers here but feels like there's something left unsaid maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if it's default behavior how can it also be experimental?

The idea is that it's on by default (so anyone can use it without having to add experimental flags), but that it's still experimental to give us a bit of an out to be able to make breaking changes. In particular, I'm trying to leave space open for changing whether or not this is interactive by default. That all said, it's a stable feature, so maybe that's being a bit overcautious.

if I mess up and omit a KV namespace ID, and then deploy, can I inadvertently have a bad deployment?

No, that's what this feature supports. As part of the deploy process a real namespace would be provisioned, and so you'd end up with a deployment that worked exactly as it did during local dev.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we should change the wording to say that this feature is in open beta (which is really what we are doing here), and point out that this means we may make breaking changes to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the wording a bit—how does that look now?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good to me, very much in favour of the beta wording.

Copy link
Contributor

@Oxyjun Oxyjun left a comment

Choose a reason for hiding this comment

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

Approving from PCX to ensure there's no holdup.

@penalosa penalosa merged commit cb4b161 into production Oct 24, 2025
8 checks passed
@penalosa penalosa deleted the penalosa/resource-provisioning-changelog branch October 24, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.