-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcloudflare.tf
174 lines (145 loc) · 3.9 KB
/
cloudflare.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
variable "cloudflare_api_token" {}
variable "cloudflare_account_id" {}
locals {
tilia_cluster_domain = "tilia.cluster.infra.public-transport.earth"
}
provider "cloudflare" {
api_token = var.cloudflare_api_token
}
# zones
resource "cloudflare_zone" "bahn_guru" {
account_id = var.cloudflare_account_id
zone = "bahn.guru"
jump_start = false
paused = true
plan = "free"
}
resource "cloudflare_zone" "railway_guru" {
account_id = var.cloudflare_account_id
zone = "railway.guru"
jump_start = false
paused = true
plan = "free"
}
resource "cloudflare_zone" "umsteigen_jetzt" {
account_id = var.cloudflare_account_id
zone = "umsteigen.jetzt"
jump_start = false
paused = true
plan = "free"
}
resource "cloudflare_zone" "pricemap_eu" {
account_id = var.cloudflare_account_id
zone = "pricemap.eu"
jump_start = false
paused = true
plan = "free"
}
# dnssec
resource "cloudflare_zone_dnssec" "bahn_guru_dnssec" {
zone_id = cloudflare_zone.bahn_guru.id
}
resource "cloudflare_zone_dnssec" "railway_guru_dnssec" {
zone_id = cloudflare_zone.railway_guru.id
}
resource "cloudflare_zone_dnssec" "umsteigen_jetzt_dnssec" {
zone_id = cloudflare_zone.umsteigen_jetzt.id
}
resource "cloudflare_zone_dnssec" "pricemap_eu_dnssec" {
zone_id = cloudflare_zone.pricemap_eu.id
}
# records for bahn.guru
resource "cloudflare_record" "bahn_guru_root" {
zone_id = cloudflare_zone.bahn_guru.id
type = "CNAME"
name = "@"
value = local.tilia_cluster_domain
proxied = true
}
resource "cloudflare_record" "bahn_guru_direkt" {
zone_id = cloudflare_zone.bahn_guru.id
type = "CNAME"
name = "direkt"
value = "juliuste.github.io"
proxied = true
}
resource "cloudflare_record" "bahn_guru_direkt_subdomains" {
zone_id = cloudflare_zone.bahn_guru.id
type = "CNAME"
name = "*.direkt"
value = local.tilia_cluster_domain
proxied = true
}
resource "cloudflare_record" "bahn_guru_beta" {
zone_id = cloudflare_zone.bahn_guru.id
type = "CNAME"
name = "beta"
value = "cname.vercel-dns.com"
proxied = true
}
resource "cloudflare_record" "bahn_guru_beta_subdomains" {
zone_id = cloudflare_zone.bahn_guru.id
type = "CNAME"
name = "*.beta"
value = local.tilia_cluster_domain
proxied = true
}
resource "cloudflare_record" "bahn_guru_developer" {
zone_id = cloudflare_zone.bahn_guru.id
type = "CNAME"
name = "developer"
value = local.tilia_cluster_domain
proxied = true
}
resource "cloudflare_record" "bahn_guru_subdomains" {
zone_id = cloudflare_zone.bahn_guru.id
type = "CNAME"
name = "*"
value = local.tilia_cluster_domain
proxied = true
}
# records for railway.guru
resource "cloudflare_record" "railway_guru_root" {
zone_id = cloudflare_zone.railway_guru.id
type = "CNAME"
name = "@"
value = local.tilia_cluster_domain
proxied = true
}
resource "cloudflare_record" "railway_guru_subdomains" {
zone_id = cloudflare_zone.railway_guru.id
type = "CNAME"
name = "*"
value = local.tilia_cluster_domain
proxied = true
}
# records for umsteigen.jetzt
resource "cloudflare_record" "umsteigen_jetzt_root" {
zone_id = cloudflare_zone.umsteigen_jetzt.id
type = "CNAME"
name = "@"
value = local.tilia_cluster_domain
proxied = true
}
resource "cloudflare_record" "umsteigen_jetzt_subdomains" {
zone_id = cloudflare_zone.umsteigen_jetzt.id
type = "CNAME"
name = "*"
value = local.tilia_cluster_domain
proxied = true
}
# records for pricemap.eu
resource "cloudflare_record" "pricemap_eu_root" {
zone_id = cloudflare_zone.pricemap_eu.id
type = "CNAME"
name = "@"
value = local.tilia_cluster_domain
proxied = true
}
resource "cloudflare_record" "pricemap_eu_subdomains" {
zone_id = cloudflare_zone.pricemap_eu.id
type = "CNAME"
name = "*"
value = local.tilia_cluster_domain
proxied = true
}