Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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)

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.
products:
- workers
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.

For more details, check out our [documentation](/workers/wrangler/automatic-resource-creation) on how to get started with automatic resource creation.
You can now automatically create Cloudflare resources when deploying a Worker with Wrangler. 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.

```bash
$ wrangler deploy --x-provision
Expand Down Expand Up @@ -41,5 +39,4 @@ Deployed my-worker triggers
https://my-worker.workers.dev
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).
For more details, check out our [documentation](/workers/wrangler/automatic-resource-provisioning) on how to get started.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
pcx_content_type: concept
title: Automatic Resource Creation
title: Automatically provision Cloudflare resources when deploying a Worker with Wrangler (Beta)
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.
sidebar:
badge:
Expand All @@ -9,9 +9,9 @@ sidebar:

import { PackageManagers, WranglerConfig } from "~/components";

You can now automatically provision 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.
You can now automatically provision Cloudflare resources as part of your deployment. You no longer need to manually run separate commands to create resources that do not yet exist on your account prior to deploying.

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.
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 detect and 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:
Expand Down Expand Up @@ -57,7 +57,7 @@ When you're ready to deploy, run:
args={"deploy –-x-provision"}
/>

Upon deploy Wrangler will automatically create the resources that do not yet exist on your accound and bind them to your Worker.
Upon deploy, Wrangler will automatically create the resources that do not yet exist on your account and bind them to your Worker. Each newly created resource will be named with the format `<worker-name>-<binding-name>` by default.

```bash
$ wrangler deploy --x-provision
Expand Down Expand Up @@ -91,7 +91,5 @@ Deployed my-worker triggers
Current Version ID: ...
```

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).
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.
Loading