Skip to content

Commit 24acefe

Browse files
committed
Fix Cloud Run domain mapping and DNS configuration
- Change CNAME target from Cloud Run URL to ghs.googlehosted.com - Set Cloudflare proxy to false (DNS-only mode required for domain mapping) - This follows Google Cloud Run best practices for custom domain setup - Users can manually enable proxy in Cloudflare after domain mapping completes
1 parent 2b013a8 commit 24acefe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dns.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

2-
# DNS CNAME record for application subdomain pointing to hrafnar application
2+
# DNS CNAME record for application subdomain pointing to Google Cloud Run
33
resource "cloudflare_record" "app" {
44
count = var.enable_cloudflare_dns && var.base_domain != "" ? 1 : 0
55
zone_id = var.cloudflare_zone_id
66
name = var.app_subdomain
7-
content = replace(google_cloud_run_service.main_app.status[0].url, "https://", "")
7+
content = "ghs.googlehosted.com"
88
type = "CNAME"
9-
proxied = true
9+
proxied = false # Must be DNS-only initially for domain mapping to work
1010

1111
comment = "Managed by Terraform - Application endpoint for ${local.resource_prefix} hrafnar application"
1212

0 commit comments

Comments
 (0)