cloudflare · Cloudflare Workers Docs
Workers Infrastructure as Code (IaC)
Guides for deploying and managing Cloudflare Workers programmatically using Terraform, Pulumi, and Cloudflare SDKs, including specific instructions for handling bindings and bundling workflows.
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, including specific instructions for handling bindings and bundling workflows.
When To Use
Use when automating Worker deployments through CI/CD pipelines, managing infrastructure via Terraform, or using SDKs to programmatically control Cloudflare resources.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-infrastructure-as-iac-workflow-guide.md | An overview of managing Cloudflare Workers using Infrastructure as Code tools like Terraform and the Workers API. | Questions about an overview of managing Cloudflare Workers using Infrastructure as Code tools like Terraform and the Workers API. |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-wrangler-deploy-dry.text | A command line instruction 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 instruction demonstrating how to use wrangler deploy with the dry-run and outdir flags to preview infr... |
examples/workers-infrastructure-as-iac-cloudflare-workers-terraform-iac.text | A Terraform configuration file demonstrating how to provision Cloudflare Workers and worker versions using infrastructure as code. | Exact payloads, commands, or snippets shown in A Terraform configuration file demonstrating how to provision Cloudflare Workers and worker versions using infrastruc... |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-bindings-configurat.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-iac-cloudflare-workers-iac-hcl-bindings.text | An example of defining Cloudflare Workers resource bindings using HCL syntax. | Exact payloads, commands, or snippets shown in An example of defining Cloudflare Workers resource bindings using HCL syntax. |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-bindings-configurat-2.text | A text configuration example demonstrating how to define resource bindings for Cloudflare Workers using Infrastructure as Code syntax. | Exact payloads, commands, or snippets shown in A text configuration example demonstrating how to define resource bindings for Cloudflare Workers using Infrastructur... |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-bindings-configurat-3.text | A text configuration showing how to define resource bindings like Durable Object namespaces within a Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A text configuration showing how to define resource bindings like Durable Object namespaces within a Workers Infrastr... |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-bindings-configurat-4.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-iac-cloudflare-workers-iac-bindings-configurat-5.text | A text configuration example 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 example demonstrating how to define resource bindings like queues within a Workers Infrastructur... |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-bindings-configurat-6.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-iac-cloudflare-workers-iac-bindings-configurat-7.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-iac-cloudflare-workers-iac-bindings-configurat-8.text | A text configuration snippet demonstrating how to define resource bindings for Cloudflare Workers using Infrastructure as Code. | 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-iac-cloudflare-workers-iac-bindings-configurat-9.text | A configuration snippet defining service bindings and VPC service IDs for Workers Infrastructure as Code. | Exact payloads, commands, or snippets shown in A configuration snippet defining service bindings and VPC service IDs for Workers Infrastructure as Code. |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-bindings-configurat-10.text | A text configuration snippet demonstrating 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 snippet demonstrating how to define worker bindings such as analytics engine datasets using infr... |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-bindings-configurat-11.text | A configuration snippet demonstrating how to define variable bindings within a Workers Infrastructure as Code setup. | Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to define variable bindings within a Workers Infrastructure as Code setup. |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-hcl-bindings-config.text | A HCL configuration snippet demonstrating how to define resource bindings for Cloudflare Workers using Infrastructure as Code. | Exact payloads, commands, or snippets shown in A HCL configuration snippet demonstrating how to define resource bindings for Cloudflare Workers using Infrastructure... |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-terraform-resource.text | A Terraform configuration snippet demonstrating how to define a cloudflare_worker_version resource for managing Workers via infrastructure as code. | Exact payloads, commands, or snippets shown in A Terraform configuration snippet demonstrating how to define a cloudflareworkerversion resource for managing Workers... |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-create-deploy-scrip.text | A shell script using npm and tsn to create and deploy a Cloudflare Worker via infrastructure as code. | Exact payloads, commands, or snippets shown in A shell script using npm and tsn to create and deploy a Cloudflare Worker via infrastructure as code. |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-create-deploy-scrip-2.text | A shell script using npm and tsn to create and deploy a Cloudflare Worker via infrastructure as code. | Exact payloads, commands, or snippets shown in A shell script using npm and tsn to create and deploy a Cloudflare Worker via infrastructure as code. |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-shell-script-variab.text | A shell script snippet defining environment variables such as account_id, api_token, and base64 encoded worker scripts for infrastructure management. | 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-iac-cloudflare-workers-iac-shell-script.text | A shell script demonstrating how to use environment variables and base64 encoded scripts to manage Cloudflare Workers via infrastructure as code principles. | Exact payloads, commands, or snippets shown in A shell script demonstrating how to use environment variables and base64 encoded scripts to manage Cloudflare Workers... |
examples/workers-infrastructure-as-iac-cloudflare-workers-api-curl-script-upload.text | A curl command demonstrating how to upload a Worker script to the Cloudflare API using an account ID and API token. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to upload a Worker script to the Cloudflare API using an account ID and API token. |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-dispatch-namespace-.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-iac-cloudflare-workers-api-script-upload-curl.text | A curl command demonstrating how to upload a Worker script with metadata and bindings via the Cloudflare API. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to upload a Worker script with metadata and bindings via the Cloudflare API. |
examples/workers-infrastructure-as-iac-cloudflare-workers-terraform-resource-conf.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-iac-cloudflare-workers-terraform-import-comman.text | A terraform import command used to bring an existing cloudflare worker version into infrastructure as code management. | Exact payloads, commands, or snippets shown in A terraform import command used to bring an existing cloudflare worker version into infrastructure as code management. |
examples/workers-infrastructure-as-iac-cloudflare-workers-iac-terraform-worker-ve.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-iac-cloudflare-workers-iac-terraform-worker-ve-2.text | A Terraform configuration snippet demonstrating how to deploy a Cloudflare Worker using the cloudflare_worker_version resource with base64 encoded content. | Exact payloads, commands, or snippets shown in A Terraform configuration snippet demonstrating how to deploy a Cloudflare Worker using the cloudflareworkerversion r... |
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
