Files
blackroad-infra/terraform/modules/cloudflare-worker/main.tf
Alexa Amundson 63cf488432 Scaffold blackroad-infra: Terraform modules, Docker configs, CI templates
- Terraform environments (production, staging) with R2 backend
- Terraform modules: cloudflare-pages, cloudflare-worker, railway-service, digitalocean-droplet
- Docker: multi-stage Dockerfiles for core, web, agents, operator + compose
- CI templates: node-ci, terraform-ci, docker-ci reusable workflows
- Composite actions: brand-compliance, deploy-cloudflare
- Operational scripts: bootstrap, health-check, rotate-keys
- GitHub Actions: terraform-plan, terraform-apply, docker-build

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:53:12 -06:00

15 lines
432 B
HCL

# Copyright (c) 2025-2026 BlackRoad OS, Inc. All Rights Reserved.
resource "cloudflare_worker_script" "this" {
account_id = var.account_id
name = var.name
content = file(var.script_path)
module = true
}
resource "cloudflare_worker_route" "this" {
count = var.route_pattern != "" ? 1 : 0
zone_id = var.zone_id
pattern = var.route_pattern
script_name = cloudflare_worker_script.this.name
}