Skip to content

Conversation

@nevikashah
Copy link
Contributor

Summary

add resource provisioning beta

Documentation checklist

  • [x ] The documentation style guide has been adhered to.
  • [ x] If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2025

@@ -0,0 +1,54 @@
---
pcx_content_type: concept
title: Resource Provisioning
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 we can do better on title

---
pcx_content_type: concept
title: Resource Provisioning
description: Automatically provision Cloudflare resources when deploying your Worker with bindings.
Copy link
Contributor

Choose a reason for hiding this comment

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

Very internal language - how can we make accessible?

Copy link
Contributor

@irvinebroque irvinebroque left a comment

Choose a reason for hiding this comment

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

Think showing example output of Wrangler a bit more can help

Is there a reason this is top-level in the wrangler docs?

And conversely — is there a reason not to put on changelog?

@nevikashah nevikashah requested review from a team, GregBrimble and WalshyDev as code owners February 13, 2025 20:58
@nevikashah nevikashah force-pushed the nevi/wranglerresourceprovisioning branch from c0e10c6 to 29cf526 Compare February 13, 2025 21:17
@nevikashah nevikashah requested a review from a team as a code owner February 13, 2025 21:17
@nevikashah
Copy link
Contributor Author

Think showing example output of Wrangler a bit more can help
added

Is there a reason this is top-level in the wrangler docs?
open to other thoughts on where to put it - struggled with this myself since its experimental. I wanted to have a singular home for it that I can eventually link out to in other sections. Could also go in Configurations > Bindings as a sub nav?

And conversely — is there a reason not to put on changelog?
added to changelog in this PR

@github-actions github-actions bot added size/m and removed size/s labels Feb 13, 2025
@@ -0,0 +1,45 @@
---
title: Automatic Resource Creation (Beta)
Copy link
Contributor

Choose a reason for hiding this comment

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

Post shows up in Cloudflare changelog — how do I know which product this is about?

What can I the person reading this now do?

date: 2025-02-14 00:00:00 UTC
---

You can now automatically create Cloudflare resources as part of your deployment! You no longer need to manually create any resources that do not yet exist on your account prior to deploying. Wrangler will automatically detect any required [KV](/kv), [D1](/d1), or [R2](/r2) resources and create them on your behalf.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is better than title

Don't need ! part


You can now automatically create Cloudflare resources as part of your deployment! You no longer need to manually create any resources that do not yet exist on your account prior to deploying. Wrangler will automatically detect any required [KV](/kv), [D1](/d1), or [R2](/r2) resources and create them on your behalf.

For more details, check out our [documentation](/workers/wrangler/automatic-resource-creation) on how to get started with automatic resource creation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sold it needs to be a named thing like "automatic resource creation"

Also doesn't match what is in the CLI flag that says "provision" - should call it same thing

Current Version ID: ...
```

Resource provisiong is currently a beta feature. If you run into issues or would like to leave feedback for the team to help us improve, please send us a message in our [Cloudflare Developers Discord](https://discord.cloudflare.com/) in the [Wrangler channel](https://discord.com/channels/595317990191398933/799437470004412476).
Copy link
Contributor

Choose a reason for hiding this comment

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

Just say it's beta — same stuff here about reporting stuff applies equality beta and non beta?

Beta already in title

---
pcx_content_type: concept
title: Automatic Resource Creation
description: When you deploy a Worker that binds to a Cloudflare resource, Wrangler will automatically detect and create any resources that do not exist on your account.
Copy link
Contributor

Choose a reason for hiding this comment

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

This page really makes sense too-level in wrangler docs?

@@ -0,0 +1,97 @@
---
pcx_content_type: concept
title: Automatic Resource Creation
Copy link
Contributor

Choose a reason for hiding this comment

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

See comment before about naming

With resource provisioning, if your Wrangler configuration file includes a [KV namespace](/kv/), [D1 database](/d1/), or [R2 bucket](/r2/) that does not yet exist, Wrangler will create these resources upon deployment. This is done by adding the experimental `-–x-provision` flag to your commands.

## Wrangler Configuration
You can set up your Wrangler configuration file like the following:
Copy link
Contributor

Choose a reason for hiding this comment

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

Think missing something here — the instead of

(Running commands first)

```
</WranglerConfig>

When using the experimental `-–x-provision` flag, the `id` field for KV and D1 and the `bucket_name` for R2 are optional in your wrangler configuration.
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't explain how it works though and how the resource is mapped to a specific KV namespace? If I have binding FOO declared in wrangler.toml for a KV namespace, and I login to the dash, how do I figure out what is what?

The newly created resource will be named with the format `<worker-name>-<binding-name>` by default.

## Feedback
Resource provisiong is currently a beta feature. If you run into issues or would like to leave feedback for the team to help us improve, please send us a message in our [Cloudflare Developers Discord](https://discord.cloudflare.com/) in the [Wrangler channel](https://discord.com/channels/595317990191398933/799437470004412476).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Resource provisiong is currently a beta feature. If you run into issues or would like to leave feedback for the team to help us improve, please send us a message in our [Cloudflare Developers Discord](https://discord.cloudflare.com/) in the [Wrangler channel](https://discord.com/channels/595317990191398933/799437470004412476).
Resource provisiong is currently in beta. Drop us a note in the [Cloudflare Developers Discord](https://discord.cloudflare.com/) in the [Wrangler channel](https://discord.com/channels/595317990191398933/799437470004412476) and tell us what you think

Copy link
Contributor

@irvinebroque irvinebroque left a comment

Choose a reason for hiding this comment

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

Doesn't it need to be mentioned here?

https://developers.cloudflare.com/workers/wrangler/commands/

@@ -1,14 +1,12 @@
---
title: Automatic Resource Creation (Beta)
title: Automatically provision Cloudflare resources when deploying a Worker with Wrangler (Beta)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
title: Automatically provision Cloudflare resources when deploying a Worker with Wrangler (Beta)
title: Automatically provision storage and databases when deploying a Worker with Wrangler (Beta)

@penalosa
Copy link
Contributor

Doesn't it need to be mentioned here?

https://developers.cloudflare.com/workers/wrangler/commands/

Probably once it's stable, but I think while it's experimental it make sense to have a dedicated page to point people to for testing? Once we stabilise this I imagine it'll need to be documented across the command and config pages as effectively just a feature of e.g. the wrangler deploy command (in the same vein as routes—it's just an assumed feature of wrangler deploy that Wrangler will update the routes for your Worker on deploy)

@ToriLindsay ToriLindsay requested a review from a team as a code owner April 22, 2025 15:27
@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented Apr 22, 2025

Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment.

We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.


PR Change Summary

Introduced automatic resource provisioning for Cloudflare Workers using Wrangler, currently in beta.

  • Added documentation for automatic resource provisioning when deploying Workers with Wrangler.
  • Introduced the experimental --x-provision flag to facilitate automatic resource creation.
  • Updated Wrangler configuration examples to reflect new provisioning capabilities.

Added Files

  • src/content/changelog/workers/2025-02-14-automatic-resource-provisioning-beta.mdx
  • src/content/docs/workers/wrangler/automatic-resource-provisioning.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

@ToriLindsay ToriLindsay assigned kodster28 and unassigned ToriLindsay Jun 6, 2025
@kodster28
Copy link
Collaborator

This has been sitting for quite a while without any movement. Closing out for now, but feel free to re-open if this is still valid / needed

@kodster28 kodster28 closed this Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants