@@ -18,7 +18,15 @@ resource "cloudflare_pages_project" "docs" {
1818 name = " pywire-docs"
1919 production_branch = " main"
2020
21-
21+ source = {
22+ type = " github"
23+ config = {
24+ owner = " pywire"
25+ repo_name = " pywire"
26+ production_branch = " main"
27+ deployments_enabled = false
28+ }
29+ }
2230
2331 build_config = {
2432 root_dir = " docs"
@@ -32,6 +40,16 @@ resource "cloudflare_pages_project" "landing" {
3240 name = " pywire-landing"
3341 production_branch = " main"
3442
43+ source = {
44+ type = " github"
45+ config = {
46+ owner = " pywire"
47+ repo_name = " pywire.dev"
48+ production_branch = " main"
49+ deployments_enabled = false
50+ }
51+ }
52+
3553 build_config = {
3654 root_dir = " site"
3755 build_command = " pnpm run build"
@@ -73,15 +91,15 @@ resource "cloudflare_dns_record" "vscode_verification" {
7391
7492# --- 4. The DNS & Routing ---
7593resource "cloudflare_workers_route" "catch_all" {
76- zone_id = var. zone_id
77- pattern = " pywire.dev/*"
78- script = cloudflare_workers_script. router . script_name
94+ zone_id = var. zone_id
95+ pattern = " pywire.dev/*"
96+ script = cloudflare_workers_script. router . script_name
7997}
8098
8199resource "cloudflare_workers_route" "nightly" {
82- zone_id = var. zone_id
83- pattern = " nightly.pywire.dev/*"
84- script = cloudflare_workers_script. router . script_name
100+ zone_id = var. zone_id
101+ pattern = " nightly.pywire.dev/*"
102+ script = cloudflare_workers_script. router . script_name
85103}
86104
87105# --- 5. Email Routing Setup ---
@@ -96,7 +114,7 @@ resource "cloudflare_email_routing_settings" "main" {
96114# Helper to find every unique email address across both variables
97115locals {
98116 all_unique_emails = distinct (concat (
99- values (var. forwarding_rules ),
117+ values (var. forwarding_rules ),
100118 var. maintainer_emails
101119 ))
102120}
@@ -123,7 +141,7 @@ resource "cloudflare_email_routing_rule" "individual_aliases" {
123141 }]
124142
125143 actions = [{
126- type = " forward"
144+ type = " forward"
127145 # Look up the verified address resource
128146 value = [cloudflare_email_routing_address.destinations[each.value].email]
129147 }]
@@ -145,7 +163,7 @@ resource "cloudflare_email_routing_rule" "maintainers_group" {
145163 type = " forward"
146164 # Dynamically grab the verified email ID for everyone in the list
147165 value = [
148- for email in var . maintainer_emails :
166+ for email in var . maintainer_emails :
149167 cloudflare_email_routing_address.destinations[email].email
150168 ]
151169 }]
0 commit comments