-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdns_bacchus-io.tf
59 lines (52 loc) · 1.3 KB
/
dns_bacchus-io.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
locals {
dns_bacchus-io = [
# github site verification
{
name = "_github-pages-challenge-bacchus-snu"
type = "TXT"
content = "\"24840067c4e087c4402adc898013cd\""
},
# alias
{
name = "horoyoi"
type = "CNAME"
content = "horoyoi.snucse.org"
},
{
name = "waiter"
type = "CNAME"
content = "kerkoporta.snucse.org"
},
{
name = "web_gateway"
type = "CNAME"
content = "kerkoporta.snucse.org"
},
# route argocd-webhook through tunnel
{
name = "argocd-webhook"
type = "CNAME"
content = cloudflare_zero_trust_tunnel_cloudflared.webhook.cname
proxied = true
},
# waffle development server
{
name = "cse-dev-waffle"
type = "A"
content = "147.46.242.210"
},
]
}
resource "cloudflare_zone" "bacchus" {
account_id = "9d0fe600126436ae84ee3f9ed2f60a9c"
zone = "bacchus.io"
}
resource "cloudflare_record" "bacchus_records" {
for_each = { for r in local.dns_bacchus-io : "${r.name}_${r.type}" => r }
zone_id = cloudflare_zone.bacchus.id
comment = "managed by Terraform"
name = each.value.name
type = each.value.type
content = each.value.content
proxied = lookup(each.value, "proxied", false)
}