Skip to content

[Workers] Add getting started guide for API and IaC #21008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: production
Choose a base branch
from

Conversation

markjmiller
Copy link
Contributor

Summary

There are no official documented examples of how to properly upload a workers script with content and metadata. This is a non-starter for API users. Ideally these examples could live in the API docs themselves, but we can't make custom examples there yet. This doc serves as a practical guide in the meantime that will unblock users.

Documentation checklist

Copy link
Contributor

hyperlint-ai bot commented Mar 20, 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

Added a getting started guide for the Workers API and Infrastructure as Code (IaC) to assist users in uploading scripts with content and metadata.

  • Introduced a new guide for uploading Workers scripts using the API and IaC tools.
  • Updated multipart upload metadata documentation with a reference to the new guide.
  • Provided examples for uploading scripts using cURL, cloudflare-typescript, and Terraform.

Modified Files

  • src/content/docs/workers/configuration/multipart-upload-metadata.mdx

Added Files

  • src/content/docs/workers/get-started/api-iac.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.

@markjmiller markjmiller force-pushed the markmiller/workers-api-iac branch from 50b9991 to 741a430 Compare March 20, 2025 21:30
@markjmiller markjmiller force-pushed the markmiller/workers-api-iac branch from 741a430 to 958e08f Compare March 20, 2025 22:33
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.

Let's find right home for this content and do bit more here

@markjmiller markjmiller force-pushed the markmiller/workers-api-iac branch 2 times, most recently from c7df2be to 60ec915 Compare March 21, 2025 16:52
@markjmiller
Copy link
Contributor Author

Let's find right home for this content and do bit more here

@irvinebroque moved to Platform > Managing Workers which feels appropriate

Copy link
Contributor

@korinne korinne left a comment

Choose a reason for hiding this comment

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

Looks good!

@markjmiller markjmiller force-pushed the markmiller/workers-api-iac branch from 5ece160 to f629f24 Compare March 25, 2025 20:03
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 there is a lot to each of these sections, ex each of these is worthy of a section

Infrastructure-as-Code (Iac)
- Overview
- Terraform
- API SDKs
- Cloudflare REST API

Also things to consider about discoverableility from here:

https://developers.cloudflare.com/terraform/additional-configurations

Also seems like this example really shows how much about multipart upload metadata is bleeding into the SDK API:

https://github.com/cloudflare/cloudflare-typescript/blob/883b9b45d62a5e87c4ffaf4e301e23dd1f3ebc7b/examples/workers/script-upload.ts#L32

lot of stuff in order to just take a file and deploy it to us.

}}
/>

### Terraform
Copy link
Contributor

Choose a reason for hiding this comment

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

What guidance do we give on when to use / not to use?

@markjmiller markjmiller force-pushed the markmiller/workers-api-iac branch from f629f24 to ddb8f33 Compare April 14, 2025 17:59
@markjmiller markjmiller requested a review from ranbel as a code owner April 14, 2025 17:59
@github-actions github-actions bot added size/m product:terraform Related to Terraform product and removed size/s labels Apr 14, 2025
@markjmiller markjmiller force-pushed the markmiller/workers-api-iac branch from 0ed35ff to c45a99b Compare April 18, 2025 15:14
@markjmiller markjmiller force-pushed the markmiller/workers-api-iac branch from c45a99b to 372ca8c Compare April 18, 2025 16:06
@markjmiller
Copy link
Contributor Author

Don't merge until...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product:cloudflare-for-platforms product:terraform Related to Terraform product product:workers Related to Workers product size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants