cloudflare · Cloudflare Workers Docs
Workers Infrastructure as Code (IaC)
Guides for deploying and managing Cloudflare Workers programmatically using Terraform, Pulumi, and Cloudflare SDKs for TypeScript and Python, including how to handle bundling and resource bindings.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Infrastructure as Code (IaC)
Guides for deploying and managing Cloudflare Workers programmatically using Terraform, Pulumi, and Cloudflare SDKs for TypeScript and Python, including how to handle bundling and resource bindings.
When To Use
Use when you need to automate Worker deployments through CI/CD pipelines, build custom developer tools, or manage Cloudflare resources using Infrastructure as Code tools like Terraform or Pulumi.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-infrastructure-as-index-iac-workflow-guide.md | An overview of programmatic management options for Cloudflare Workers, including Terraform, Wrangler, and the Workers API. | Questions about an overview of programmatic management options for Cloudflare Workers, including Terraform, Wrangler, and the Workers... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-wrangler-depl.text | A command line example demonstrating how to use wrangler deploy with the dry-run and outdir flags to preview infrastructure changes. | Exact payloads, commands, or snippets shown in A command line example demonstrating how to use wrangler deploy with the dry-run and outdir flags to preview infrastr... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-terraform-iac.text | A Terraform configuration file demonstrating how to provision a Cloudflare Worker and its version using infrastructure as code. | Exact payloads, commands, or snippets shown in A Terraform configuration file demonstrating how to provision a Cloudflare Worker and its version using infrastructur... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf.text | A configuration snippet demonstrating how to define resource bindings like KV namespaces within a Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to define resource bindings like KV namespaces within a Workers Infrastruct... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-2.text | A configuration snippet demonstrating how to define resource bindings like R2 buckets within a Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to define resource bindings like R2 buckets within a Workers Infrastructure... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-3.text | A text configuration snippet demonstrating how to define resource bindings for Cloudflare Workers using Infrastructure as Code syntax. | Exact payloads, commands, or snippets shown in A text configuration snippet demonstrating how to define resource bindings for Cloudflare Workers using Infrastructur... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-4.text | A configuration snippet demonstrating how to define durable object namespace bindings within a Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to define durable object namespace bindings within a Workers Infrastructure... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-5.text | A configuration snippet demonstrating how to define service bindings within a Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to define service bindings within a Workers Infrastructure as Code setup. |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-6.text | A text configuration snippet demonstrating how to define resource bindings like queues within a Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A text configuration snippet demonstrating how to define resource bindings like queues within a Workers Infrastructur... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-7.text | A text configuration snippet demonstrating how to define resource bindings like Vectorize within a Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A text configuration snippet demonstrating how to define resource bindings like Vectorize within a Workers Infrastruc... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-8.text | A text configuration example demonstrating how to define resource bindings within a Cloudflare Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A text configuration example demonstrating how to define resource bindings within a Cloudflare Workers Infrastructure... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-9.text | A text configuration example demonstrating how to define resource bindings within a Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A text configuration example demonstrating how to define resource bindings within a Workers Infrastructure as Code se... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-10.text | A configuration snippet demonstrating how to define service bindings within a Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to define service bindings within a Workers Infrastructure as Code setup. |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-11.text | A text configuration showing how to define worker bindings such as analytics engine datasets using infrastructure as code syntax. | Exact payloads, commands, or snippets shown in A text configuration showing how to define worker bindings such as analytics engine datasets using infrastructure as... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-bindings-conf-12.text | A text configuration example demonstrating how to define variable bindings within Cloudflare Workers Infrastructure as Code. | Exact payloads, commands, or snippets shown in A text configuration example demonstrating how to define variable bindings within Cloudflare Workers Infrastructure a... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-terraform-bin.text | A Terraform configuration snippet demonstrating how to define resource bindings for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A Terraform configuration snippet demonstrating how to define resource bindings for Cloudflare Workers. |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-terraform-res.text | A Terraform configuration snippet defining a cloudflare_worker_version resource for managing Worker deployments via infrastructure as code. | Exact payloads, commands, or snippets shown in A Terraform configuration snippet defining a cloudflareworkerversion resource for managing Worker deployments via inf... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-create-deploy.text | A shell script using npm to create and deploy a Cloudflare Worker via infrastructure as code principles. | Exact payloads, commands, or snippets shown in A shell script using npm to create and deploy a Cloudflare Worker via infrastructure as code principles. |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-create-deploy-2.text | A shell script using npm to create and deploy a Cloudflare Worker via infrastructure as code. | Exact payloads, commands, or snippets shown in A shell script using npm to create and deploy a Cloudflare Worker via infrastructure as code. |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-shell-variabl.text | A shell script snippet demonstrating how to define environment variables like account_id and worker_name for managing Workers via Infrastructure as Code. | Exact payloads, commands, or snippets shown in A shell script snippet demonstrating how to define environment variables like accountid and workername for managing W... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-shell-variabl-2.text | A shell script snippet defining environment variables such as account_id, api_token, and base64 encoded worker scripts for infrastructure as code operations. | Exact payloads, commands, or snippets shown in A shell script snippet defining environment variables such as accountid, apitoken, and base64 encoded worker scripts... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-curl-upload-s.text | A curl command demonstrating how to upload a Worker script to the Cloudflare API using account credentials and a script payload. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to upload a Worker script to the Cloudflare API using account credentials and a scri... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-dispatch-name.text | A curl command demonstrating how to create a Workers dispatch namespace using the Cloudflare API. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to create a Workers dispatch namespace using the Cloudflare API. |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-api-script-up.text | A curl command demonstrating how to upload a Workers script using the Cloudflare API with metadata and bindings. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to upload a Workers script using the Cloudflare API with metadata and bindings. |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-terraform-resourc.text | A Terraform configuration snippet defining a cloudflare_worker and its associated cloudflare_workerversion resources. | Exact payloads, commands, or snippets shown in A Terraform configuration snippet defining a cloudflareworker and its associated cloudflareworkerversion resources. |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-terraform-import-.text | A terraform import command used to bring an existing Cloudflare Worker version under Terraform management. | Exact payloads, commands, or snippets shown in A terraform import command used to bring an existing Cloudflare Worker version under Terraform management. |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-terraform-wor.text | A Terraform configuration snippet demonstrating the use of the cloudflare_worker_version resource to deploy worker content. | Exact payloads, commands, or snippets shown in A Terraform configuration snippet demonstrating the use of the cloudflareworkerversion resource to deploy worker cont... |
examples/workers-infrastructure-as-index-iac-cloudflare-workers-iac-terraform-wor-2.text | A Terraform configuration snippet demonstrating how to use the cloudflare_worker_version resource with base64 encoded module content. | Exact payloads, commands, or snippets shown in A Terraform configuration snippet demonstrating how to use the cloudflareworkerversion resource with base64 encoded m... |
What This Skill Covers
- While Wrangler makes it easy to upload and manage Workers, there are times when you need a more programmatic approach. This could involve using Infrastructur...
- Main sections:
Workers Bundling,Terraform,Bindings in Terraform,KV Namespace Binding,R2 Bucket Binding.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/platform/infrastructure-as-code/index.md
