The Workers for Platforms resource allows you to manage Cloudflare Workers for Platforms namespaces.
resource "cloudflare_workers_for_platforms_namespace" "example" {
account_id = "f037e56e89293a057740de681ac9abbe"
name = "example-namespace"
}
resource "cloudflare_worker_script" "customer_worker_1" {
account_id = "f037e56e89293a057740de681ac9abbe"
name = "customer-worker-1"
content = file("script.js")
dispatch_namespace = cloudflare_workers_for_platforms_namespace.example.name
tags = ["free"]
}
account_id
(String) The account identifier to target for the resource.name
(String) The name of the Workers for Platforms namespace.id
(String) The identifier of this resource.Import is supported using the following syntax:
$ terraform import cloudflare_workers_for_platforms_namespace.example <account_id>/<namespace_name>