From e1761d6c8fb2d391c9a1d2df5f883258bb5daadd Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Wed, 15 Jan 2025 11:37:00 +0000 Subject: [PATCH] Implementing partials for R2 Wrangler commands. --- src/content/changelogs/r2.yaml | 8 +- .../tutorials/deploy-aig-worker.mdx | 2 +- .../workers/get-started/c3-and-wrangler.mdx | 2 +- .../docs/r2/buckets/create-buckets.mdx | 6 +- .../docs/r2/buckets/event-notifications.mdx | 2 +- .../docs/r2/buckets/object-lifecycles.mdx | 10 +- src/content/docs/r2/data-migration/sippy.mdx | 4 +- .../docs/r2/tutorials/summarize-pdf.mdx | 2 +- .../upload-logs-event-notifications.mdx | 2 +- .../docs/workers/configuration/secrets.mdx | 2 +- .../gradual-deployments.mdx | 2 +- .../versions-and-deployments/index.mdx | 2 +- .../tutorials/build-a-jamstack-app/index.mdx | 2 +- .../index.mdx | 6 +- .../index.mdx | 4 +- .../openai-function-calls-workers/index.mdx | 2 +- .../docs/workers/tutorials/postgres/index.mdx | 2 +- .../docs/workers/wrangler/commands.mdx | 538 +----------------- .../docs/workers/wrangler/environments.mdx | 2 +- .../partials/workers/wrangler-commands/r2.mdx | 487 ++++++++++++++++ 20 files changed, 520 insertions(+), 567 deletions(-) create mode 100644 src/content/partials/workers/wrangler-commands/r2.mdx diff --git a/src/content/changelogs/r2.yaml b/src/content/changelogs/r2.yaml index 1e5f73a2d736fe..a11dee96c45763 100644 --- a/src/content/changelogs/r2.yaml +++ b/src/content/changelogs/r2.yaml @@ -19,16 +19,16 @@ entries: - Public buckets accessible via custom domain now support Smart [Tiered Cache](/r2/buckets/public-buckets/#caching). - publish_date: "2024-11-19" description: |- - - R2 [`bucket lifecycle` command](/workers/wrangler/commands/#lifecycle-add) added to Wrangler. Supports listing, adding, and removing object lifecycle rules. + - R2 [`bucket lifecycle` command](/workers/wrangler/commands/#r2-bucket-lifecycle-add) added to Wrangler. Supports listing, adding, and removing object lifecycle rules. - publish_date: "2024-11-14" description: |- - - R2 [`bucket info` command](/workers/wrangler/commands/#info-2) added to Wrangler. Displays location of bucket and common metrics. + - R2 [`bucket info` command](/workers/wrangler/commands/r2-bucket-info) added to Wrangler. Displays location of bucket and common metrics. - publish_date: "2024-11-08" description: |- - - R2 [`bucket dev-url` command](/workers/wrangler/commands/#dev-url-enable) added to Wrangler. Supports enabling, disabling, and getting status of bucket's [r2.dev public access URL](/r2/buckets/public-buckets/#enable-managed-public-access). + - R2 [`bucket dev-url` command](/workers/wrangler/commands/#r2-bucket-dev-url-enable) added to Wrangler. Supports enabling, disabling, and getting status of bucket's [r2.dev public access URL](/r2/buckets/public-buckets/#enable-managed-public-access). - publish_date: "2024-11-06" description: |- - - R2 [`bucket domain` command](/workers/wrangler/commands/#domain-add) added to Wrangler. Supports listing, adding, removing, and updating [R2 bucket custom domains](/r2/buckets/public-buckets/#custom-domains). + - R2 [`bucket domain` command](/workers/wrangler/commands/#r2-bucket-domain-add) added to Wrangler. Supports listing, adding, removing, and updating [R2 bucket custom domains](/r2/buckets/public-buckets/#custom-domains). - publish_date: "2024-11-01" description: |- - Add `minTLS` to response of [list custom domains](/api/resources/r2/subresources/buckets/subresources/domains/subresources/custom/methods/list/) endpoint. diff --git a/src/content/docs/ai-gateway/tutorials/deploy-aig-worker.mdx b/src/content/docs/ai-gateway/tutorials/deploy-aig-worker.mdx index 6022599fe79fd9..dd17a8a90c9bec 100644 --- a/src/content/docs/ai-gateway/tutorials/deploy-aig-worker.mdx +++ b/src/content/docs/ai-gateway/tutorials/deploy-aig-worker.mdx @@ -94,7 +94,7 @@ export default { }; ``` -To make this work, you need to use [`wrangler secret put`](/workers/wrangler/commands/#put-3) to set your `OPENAI_API_KEY`. This will save the API key to your environment so your Worker can access it when deployed. This key is the API key you created earlier in the OpenAI dashboard: +To make this work, you need to use [`wrangler secret put`](/workers/wrangler/commands/#put) to set your `OPENAI_API_KEY`. This will save the API key to your environment so your Worker can access it when deployed. This key is the API key you created earlier in the OpenAI dashboard: ```sh title="Save your API key to your Workers env" npx wrangler secret put OPENAI_API_KEY diff --git a/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx b/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx index 11e721159c8829..64125e6c313051 100644 --- a/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx +++ b/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx @@ -29,7 +29,7 @@ You will use C3 for new project creation. [Wrangler](/workers/wrangler/) is a command-line tool for building with Cloudflare developer products. -With Wrangler, you can [develop](/workers/wrangler/commands/#dev) your Worker locally and remotely, [roll back](/workers/wrangler/commands/#rollback) to a previous deployment of your Worker, [delete](/workers/wrangler/commands/#delete-3) a Worker and its bound Developer Platform resources, and more. Refer to [Wrangler Commands](/workers/wrangler/commands/) to view the full reference of Wrangler commands. +With Wrangler, you can [develop](/workers/wrangler/commands/#dev) your Worker locally and remotely, [roll back](/workers/wrangler/commands/#rollback) to a previous deployment of your Worker, [delete](/workers/wrangler/commands/#delete-1) a Worker and its bound Developer Platform resources, and more. Refer to [Wrangler Commands](/workers/wrangler/commands/) to view the full reference of Wrangler commands. When you run C3 to create your project, C3 will install the latest version of Wrangler and you do not need to install Wrangler again. You can [update Wrangler](/workers/wrangler/install-and-update/#update-wrangler) to a newer version in your project to access new Wrangler capabilities and features. diff --git a/src/content/docs/r2/buckets/create-buckets.mdx b/src/content/docs/r2/buckets/create-buckets.mdx index 2100b8b988f90d..b89386f86a6759 100644 --- a/src/content/docs/r2/buckets/create-buckets.mdx +++ b/src/content/docs/r2/buckets/create-buckets.mdx @@ -17,7 +17,7 @@ The R2 support in Wrangler allows you to manage buckets and perform basic operat ## Bucket-Level Operations -Create a bucket with the [`r2 bucket create`](/workers/wrangler/commands/#create-4) command: +Create a bucket with the [`r2 bucket create`](/workers/wrangler/commands/#r2-bucket-create) command: ```sh wrangler r2 bucket create your-bucket-name @@ -31,13 +31,13 @@ The placeholder text is only for the example. ::: -List buckets in the current account with the [`r2 bucket list`](/workers/wrangler/commands/#list-5) command: +List buckets in the current account with the [`r2 bucket list`](/workers/wrangler/commands/#r2-bucket-list) command: ```sh wrangler r2 bucket list ``` -Delete a bucket with the [`r2 bucket delete`](/workers/wrangler/commands/#delete-7) command. Note that the bucket must be empty and all objects must be deleted. +Delete a bucket with the [`r2 bucket delete`](/workers/wrangler/commands/#r2-bucket-delete) command. Note that the bucket must be empty and all objects must be deleted. ```sh wrangler r2 bucket delete BUCKET_TO_DELETE diff --git a/src/content/docs/r2/buckets/event-notifications.mdx b/src/content/docs/r2/buckets/event-notifications.mdx index 04817bc9c511cb..5325ecef5ea07e 100644 --- a/src/content/docs/r2/buckets/event-notifications.mdx +++ b/src/content/docs/r2/buckets/event-notifications.mdx @@ -31,7 +31,7 @@ To begin, install [`npm`](https://docs.npmjs.com/getting-started). Then [install #### Enable event notifications on your R2 bucket -Log in to Wrangler with the [`wrangler login` command](/workers/wrangler/commands/#login). Then add an [event notification rule](/r2/buckets/event-notifications/#event-notification-rules) to your bucket by running the [`r2 bucket notification create` command](/workers/wrangler/commands/#notification-create). +Log in to Wrangler with the [`wrangler login` command](/workers/wrangler/commands/#login). Then add an [event notification rule](/r2/buckets/event-notifications/#event-notification-rules) to your bucket by running the [`r2 bucket notification create` command](/workers/wrangler/commands/#r2-bucket-notification-create). ```sh npx wrangler r2 bucket notification create --event-type --queue diff --git a/src/content/docs/r2/buckets/object-lifecycles.mdx b/src/content/docs/r2/buckets/object-lifecycles.mdx index b1d4c3f66e29d9..d827a40eb9f72f 100644 --- a/src/content/docs/r2/buckets/object-lifecycles.mdx +++ b/src/content/docs/r2/buckets/object-lifecycles.mdx @@ -16,7 +16,7 @@ For example, you can create an object lifecycle rule to delete objects after 90 - An object is no longer billable once it has been deleted. - Buckets have a default lifecycle rule to expire multipart uploads seven days after initiation. - When an object is transitioned from Standard storage to Infrequent Access storage, a [Class A operation](/r2/pricing/#class-a-operations) is incurred. -- When rules conflict and specify both a storage class transition and expire transition within a 24 hour period, the expire (or delete) lifecycle transition takes precedence over transitioning storage class. +- When rules conflict and specify both a storage class transition and expire transition within a 24 hour period, the expire (or delete) lifecycle transition takes precedence over transitioning storage class. ## Configure lifecycle rules for your bucket @@ -39,13 +39,13 @@ When you create an object lifecycle rule, you can specify which prefix you would 1. Install [`npm`](https://docs.npmjs.com/getting-started). 2. Install [Wrangler, the Developer Platform CLI](/workers/wrangler/install-and-update/). 3. Log in to Wrangler with the [`wrangler login` command](/workers/wrangler/commands/#login). -4. Add a lifecycle rule to your bucket by running the [`r2 bucket lifecycle add` command](/workers/wrangler/commands/#lifecycle-add). +4. Add a lifecycle rule to your bucket by running the [`r2 bucket lifecycle add` command](/workers/wrangler/commands/#r2-bucket-lifecycle-add). ```sh npx wrangler r2 bucket lifecycle add [OPTIONS] ``` -Alternatively you can set the entire lifecycle configuration for a bucket from a JSON file using the [`r2 bucket lifecycle set` command](/workers/wrangler/commands/#lifecycle-set). +Alternatively you can set the entire lifecycle configuration for a bucket from a JSON file using the [`r2 bucket lifecycle set` command](/workers/wrangler/commands/#r2-bucket-lifecycle-set). ```sh npx wrangler r2 bucket lifecycle set --file @@ -142,7 +142,7 @@ await client ### Wrangler -To get the list of lifecycle rules associated with your bucket, run the [`r2 bucket lifecycle list` command](/workers/wrangler/commands/#lifecycle-list). +To get the list of lifecycle rules associated with your bucket, run the [`r2 bucket lifecycle list` command](/workers/wrangler/commands/#r2-bucket-lifecycle-list). ```sh npx wrangler r2 bucket lifecycle list @@ -186,7 +186,7 @@ console.log( ### Wrangler -To remove a specific lifecycle rule from your bucket, run the [`r2 bucket lifecycle remove` command](/workers/wrangler/commands/#lifecycle-remove). +To remove a specific lifecycle rule from your bucket, run the [`r2 bucket lifecycle remove` command](/workers/wrangler/commands/#r2-bucket-lifecycle-remove). ```sh npx wrangler r2 bucket lifecycle remove --id diff --git a/src/content/docs/r2/data-migration/sippy.mdx b/src/content/docs/r2/data-migration/sippy.mdx index 1bd2c17df0988a..90a690123b9dbc 100644 --- a/src/content/docs/r2/data-migration/sippy.mdx +++ b/src/content/docs/r2/data-migration/sippy.mdx @@ -56,7 +56,7 @@ To begin, install [`npm`](https://docs.npmjs.com/getting-started). Then [install #### Enable Sippy on your R2 bucket -Log in to Wrangler with the [`wrangler login` command](/workers/wrangler/commands/#login). Then run the [`r2 bucket sippy enable` command](/workers/wrangler/commands/#sippy-enable): +Log in to Wrangler with the [`wrangler login` command](/workers/wrangler/commands/#login). Then run the [`r2 bucket sippy enable` command](/workers/wrangler/commands/#r2-bucket-sippy-enable): ```sh npx wrangler r2 bucket sippy enable @@ -127,7 +127,7 @@ You can optionally select a time window to query. This defaults to the last 24 h ### Wrangler -To disable Sippy, run the [`r2 bucket sippy disable` command](/workers/wrangler/commands/#sippy-disable): +To disable Sippy, run the [`r2 bucket sippy disable` command](/workers/wrangler/commands/#r2-bucket-sippy-disable): ```sh npx wrangler r2 bucket sippy disable diff --git a/src/content/docs/r2/tutorials/summarize-pdf.mdx b/src/content/docs/r2/tutorials/summarize-pdf.mdx index f8ce61ce6f66bb..61dfdd9edc7be7 100644 --- a/src/content/docs/r2/tutorials/summarize-pdf.mdx +++ b/src/content/docs/r2/tutorials/summarize-pdf.mdx @@ -455,7 +455,7 @@ The queue handler now adds the summary to the R2 bucket as a text file. ## 9. Enable event notifications -Your `queue` handler is ready to handle incoming event notification messages. You need to enable event notifications with the [`wrangler r2 bucket notification create` command](/workers/wrangler/commands/#notification-create) for your bucket. The following command creates an event notification for the `object-create` event type for the `pdf` suffix: +Your `queue` handler is ready to handle incoming event notification messages. You need to enable event notifications with the [`wrangler r2 bucket notification create` command](/workers/wrangler/commands/#r2-bucket-notification-create) for your bucket. The following command creates an event notification for the `object-create` event type for the `pdf` suffix: ```sh npx wrangler r2 bucket notification create --event-type object-create --queue pdf-summarizer --suffix "pdf" diff --git a/src/content/docs/r2/tutorials/upload-logs-event-notifications.mdx b/src/content/docs/r2/tutorials/upload-logs-event-notifications.mdx index 7bde1ddeae05a3..56ddc86bd10f23 100644 --- a/src/content/docs/r2/tutorials/upload-logs-event-notifications.mdx +++ b/src/content/docs/r2/tutorials/upload-logs-event-notifications.mdx @@ -148,7 +148,7 @@ npx wrangler deploy ## 8. Enable event notifications -Now that you have your consumer Worker ready to handle incoming event notification messages, you need to enable event notifications with the [`wrangler r2 bucket notification create` command](/workers/wrangler/commands/#notification-create) for `example-upload-bucket`: +Now that you have your consumer Worker ready to handle incoming event notification messages, you need to enable event notifications with the [`wrangler r2 bucket notification create` command](/workers/wrangler/commands/#r2-bucket-notification-create) for `example-upload-bucket`: ```sh npx wrangler r2 bucket notification create example-upload-bucket --event-type object-create --queue example-event-notification-queue diff --git a/src/content/docs/workers/configuration/secrets.mdx b/src/content/docs/workers/configuration/secrets.mdx index 317b95275872fe..e1330a62cf1337 100644 --- a/src/content/docs/workers/configuration/secrets.mdx +++ b/src/content/docs/workers/configuration/secrets.mdx @@ -55,7 +55,7 @@ To add a secret via the dashboard: #### Via Wrangler -Secrets can be deleted through [`wrangler secret delete`](/workers/wrangler/commands/#delete-7) or [`wrangler versions secret delete`](/workers/wrangler/commands/#secret-delete) commands. +Secrets can be deleted through [`wrangler secret delete`](/workers/wrangler/commands/#delete-2) or [`wrangler versions secret delete`](/workers/wrangler/commands/#secret-delete) commands. `wrangler secret delete` creates a new version of the Worker and deploys it immediately. diff --git a/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx b/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx index 2d597e94efa313..a54ef1e889f761 100644 --- a/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx +++ b/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx @@ -157,7 +157,7 @@ curl -s https://example.com -H 'Cloudflare-Workers-Version-Overrides: my-worker- The dictionary can contain multiple key-value pairs. Each key indicates the name of the Worker the override should be applied to. The value indicates the version ID that should be used and must be a [String](https://www.rfc-editor.org/rfc/rfc8941#name-strings). -A version override will only be applied if the specified version is in the current deployment. The versions in the current deployment can be found using the [`wrangler deployments list`](/workers/wrangler/commands/#list-6) command or on the [Workers Dashboard](https://dash.cloudflare.com/?to=/:account/workers) under Worker > Deployments > Active Deployment. +A version override will only be applied if the specified version is in the current deployment. The versions in the current deployment can be found using the [`wrangler deployments list`](/workers/wrangler/commands/#list-5) command or on the [Workers Dashboard](https://dash.cloudflare.com/?to=/:account/workers) under Worker > Deployments > Active Deployment. :::note[Verifying that the version override was applied] diff --git a/src/content/docs/workers/configuration/versions-and-deployments/index.mdx b/src/content/docs/workers/configuration/versions-and-deployments/index.mdx index f2043eee4692c5..0bb98d87f708e4 100644 --- a/src/content/docs/workers/configuration/versions-and-deployments/index.mdx +++ b/src/content/docs/workers/configuration/versions-and-deployments/index.mdx @@ -81,7 +81,7 @@ New versions are not created when you make changes to [resources connected to yo #### Via Wrangler -Wrangler allows you to view the 10 most recent versions and deployments. Refer to the [`versions list`](/workers/wrangler/commands/#list-8) and [`deployments`](/workers/wrangler/commands/#list-9) documentation to view the commands. +Wrangler allows you to view the 10 most recent versions and deployments. Refer to the [`versions list`](/workers/wrangler/commands/#list-4) and [`deployments`](/workers/wrangler/commands/#list-5) documentation to view the commands. #### Via the Cloudflare dashboard diff --git a/src/content/docs/workers/tutorials/build-a-jamstack-app/index.mdx b/src/content/docs/workers/tutorials/build-a-jamstack-app/index.mdx index 91ac3c3a9d3d9f..fe7fa2b677b6b4 100644 --- a/src/content/docs/workers/tutorials/build-a-jamstack-app/index.mdx +++ b/src/content/docs/workers/tutorials/build-a-jamstack-app/index.mdx @@ -81,7 +81,7 @@ For the remainder of this tutorial you will complete each task, iterating on you To begin, you need to understand how to populate your todo list with actual data. To do this, use [Cloudflare Workers KV](/kv/) — a key-value store that you can access inside of your Worker to read and write data. -To get started with KV, set up a namespace. All of your cached data will be stored inside that namespace and, with configuration, you can access that namespace inside the Worker with a predefined variable. Use Wrangler to create a new namespace called `TODOS` with the [`kv:namespace create` command](/workers/wrangler/commands/#create-3) and get the associated namespace ID by running the following command in your terminal: +To get started with KV, set up a namespace. All of your cached data will be stored inside that namespace and, with configuration, you can access that namespace inside the Worker with a predefined variable. Use Wrangler to create a new namespace called `TODOS` with the [`kv:namespace create` command](/workers/wrangler/commands/#kv-namespace-create) and get the associated namespace ID by running the following command in your terminal: ```sh title="Create a new KV namespace" npx wrangler kv:namespace create "TODOS" --preview diff --git a/src/content/docs/workers/tutorials/create-finetuned-chatgpt-ai-models-with-r2/index.mdx b/src/content/docs/workers/tutorials/create-finetuned-chatgpt-ai-models-with-r2/index.mdx index 095fa59d1c13e3..7634b2188d9a3b 100644 --- a/src/content/docs/workers/tutorials/create-finetuned-chatgpt-ai-models-with-r2/index.mdx +++ b/src/content/docs/workers/tutorials/create-finetuned-chatgpt-ai-models-with-r2/index.mdx @@ -71,7 +71,7 @@ cd finetune-chatgpt-model Next, upload the fine-tune document to R2. R2 is a key-value store that allows you to store and retrieve files from within your Workers application. You will use [Wrangler](/workers/wrangler) to create a new R2 bucket. -To create a new R2 bucket use the [`wrangler r2 bucket create`](/workers/wrangler/commands/#create-2) command. Note that you are logged in with your Cloudflare account. If not logged in via Wrangler, use the [`wrangler login`](/workers/wrangler/commands/#login) command. +To create a new R2 bucket use the [`wrangler r2 bucket create`](/workers/wrangler/commands/#r2-bucket-create) command. Note that you are logged in with your Cloudflare account. If not logged in via Wrangler, use the [`wrangler login`](/workers/wrangler/commands/#login) command. ```sh npx wrangler r2 bucket create @@ -79,7 +79,7 @@ npx wrangler r2 bucket create Replace `` with your desired bucket name. Note that bucket names must be lowercase and can only contain dashes. -Next, upload a file using the [`wrangler r2 object put`](/workers/wrangler/commands/#put-2) command. +Next, upload a file using the [`wrangler r2 object put`](/workers/wrangler/commands/#r2-object-put) command. ```sh npx wrangler r2 object put -f @@ -239,7 +239,7 @@ app.get("/jobs", async (c) => { After you have created your Worker application and added the required functions, deploy the application. -Before you deploy, you must set the `OPENAI_API_KEY` [secret](/workers/configuration/secrets/) for your application. Do this by running the [`wrangler secret put`](/workers/wrangler/commands/#put-3) command: +Before you deploy, you must set the `OPENAI_API_KEY` [secret](/workers/configuration/secrets/) for your application. Do this by running the [`wrangler secret put`](/workers/wrangler/commands/#put) command: ```sh npx wrangler secret put OPENAI_API_KEY diff --git a/src/content/docs/workers/tutorials/github-sms-notifications-using-twilio/index.mdx b/src/content/docs/workers/tutorials/github-sms-notifications-using-twilio/index.mdx index dfd05c38157816..cd617d5b4c086f 100644 --- a/src/content/docs/workers/tutorials/github-sms-notifications-using-twilio/index.mdx +++ b/src/content/docs/workers/tutorials/github-sms-notifications-using-twilio/index.mdx @@ -147,7 +147,7 @@ function checkSignature(text, headers, githubSecretToken) { } ``` -To make this work, you need to use [`wrangler secret put`](/workers/wrangler/commands/#put-3) to set your `GITHUB_SECRET_TOKEN`. This token is the secret you picked earlier when configuring you GitHub webhook: +To make this work, you need to use [`wrangler secret put`](/workers/wrangler/commands/#put) to set your `GITHUB_SECRET_TOKEN`. This token is the secret you picked earlier when configuring you GitHub webhook: ```sh npx wrangler secret put GITHUB_SECRET_TOKEN @@ -203,7 +203,7 @@ async function sendText(accountSid, authToken, message) { } ``` -To make this work, you need to set some secrets to hide your `ACCOUNT_SID` and `AUTH_TOKEN` from the source code. You can set secrets with [`wrangler secret put`](/workers/wrangler/commands/#put-3) in your command line. +To make this work, you need to set some secrets to hide your `ACCOUNT_SID` and `AUTH_TOKEN` from the source code. You can set secrets with [`wrangler secret put`](/workers/wrangler/commands/#put) in your command line. ```sh npx wrangler secret put TWILIO_ACCOUNT_SID diff --git a/src/content/docs/workers/tutorials/openai-function-calls-workers/index.mdx b/src/content/docs/workers/tutorials/openai-function-calls-workers/index.mdx index c53c8e7cae2569..1df3c4ece83eaa 100644 --- a/src/content/docs/workers/tutorials/openai-function-calls-workers/index.mdx +++ b/src/content/docs/workers/tutorials/openai-function-calls-workers/index.mdx @@ -98,7 +98,7 @@ async fetch(request, env, ctx) { }, ``` -Use [`wrangler secret put`](/workers/wrangler/commands/#put-3) to set `OPENAI_API_KEY`. This [secret's](/workers/configuration/secrets/) value is the API key you created earlier in the OpenAI dashboard: +Use [`wrangler secret put`](/workers/wrangler/commands/#put) to set `OPENAI_API_KEY`. This [secret's](/workers/configuration/secrets/) value is the API key you created earlier in the OpenAI dashboard: ```sh npx wrangler secret put diff --git a/src/content/docs/workers/tutorials/postgres/index.mdx b/src/content/docs/workers/tutorials/postgres/index.mdx index 53db4fdf5de193..caac9a4cd70f90 100644 --- a/src/content/docs/workers/tutorials/postgres/index.mdx +++ b/src/content/docs/workers/tutorials/postgres/index.mdx @@ -325,7 +325,7 @@ Create a Hyperdrive configuration using the connection string for your PostgreSQ npx wrangler hyperdrive create --connection-string="postgres://user:password@HOSTNAME_OR_IP_ADDRESS:PORT/database_name" ``` -You can also use explicit parameters by following the [wrangler documentation for Hyperdrive](/workers/wrangler/commands/#create-1). +You can also use explicit parameters by following the [wrangler documentation for Hyperdrive](/workers/wrangler/commands/#r2-bucket-create). This command outputs the Hyperdrive configuration `id` that will be used for your Hyperdrive [binding](/workers/runtime-apis/bindings/). Set up your binding by specifying the `id` in the `wrangler.toml` file. diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx index 6a90c90f4afcbe..f40255bef1853c 100644 --- a/src/content/docs/workers/wrangler/commands.mdx +++ b/src/content/docs/workers/wrangler/commands.mdx @@ -629,547 +629,13 @@ wrangler delete [