Files
heygo/terraform/main.tf
T
Hermes Agent cca4ea2ec3 fix: use my.dev.heygo.cc for dev private host instead of my.dev.junv.cc
junv.cc is reserved for k3s home services, not Cloudflare apps.
Both dev and prod private hosts now live under heygo.cc, sharing
the .heygo.cc cookie domain — no cross-domain auth issues.
2026-06-20 14:32:12 +10:00

31 lines
1.1 KiB
Terraform

# D1 database that stores links, sessions, users, and promotion submissions.
resource "cloudflare_d1_database" "shortlinks" {
account_id = var.account_id
name = var.d1_database_name
primary_location_hint = var.primary_location_hint
}
# Workers KV namespace used as a public link cache in front of D1.
resource "cloudflare_workers_kv_namespace" "public_cache" {
account_id = var.account_id
title = var.kv_namespace_title
}
# Custom domain for the public shortlinks host (heygo.cc / dev.heygo.cc).
# Verified v5 resource name: cloudflare_workers_custom_domain
# (see https://developers.cloudflare.com/api/terraform/resources/workers/subresources/domains/).
resource "cloudflare_workers_custom_domain" "public" {
account_id = var.account_id
zone_id = var.heygo_cc_zone_id
hostname = var.public_domain
service = var.worker_name
}
# Custom domain for the private shortlinks host (my.heygo.cc / my.dev.heygo.cc).
resource "cloudflare_workers_custom_domain" "private" {
account_id = var.account_id
zone_id = var.private_domain_zone_id
hostname = var.private_domain
service = var.worker_name
}