about summary refs log tree commit diff
path: root/ops/glesys/dns-tvl-fyi.tf
blob: 26105e9fdc3828a90374eeef4ee9ed48e20b9fba (plain) (blame)
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
# DNS configuration for tvl.fyi

resource "glesys_dnsdomain" "tvl_fyi" {
  name = "tvl.fyi"
}

resource "glesys_dnsdomain_record" "tvl_fyi_NS1" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "@"
  type   = "NS"
  data   = "ns1.namesystem.se."
}

resource "glesys_dnsdomain_record" "tvl_fyi_NS2" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "@"
  type   = "NS"
  data   = "ns2.namesystem.se."
}

resource "glesys_dnsdomain_record" "tvl_fyi_NS3" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "@"
  type   = "NS"
  data   = "ns3.namesystem.se."
}

resource "glesys_dnsdomain_record" "tvl_fyi_apex_A" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "@"
  type   = "A"
  data   = var.whitby_ipv4
}

resource "glesys_dnsdomain_record" "tvl_fyi_apex_AAAA" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "@"
  type   = "AAAA"
  data   = var.whitby_ipv6
}

resource "glesys_dnsdomain_record" "tvl_fyi_whitby_A" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "whitby"
  type   = "A"
  data   = var.whitby_ipv4
}

resource "glesys_dnsdomain_record" "tvl_fyi_whitby_AAAA" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "whitby"
  type   = "AAAA"
  data   = var.whitby_ipv6
}

# Explicit records for all services running on whitby
resource "glesys_dnsdomain_record" "tvl_fyi_whitby_services" {
  domain   = glesys_dnsdomain.tvl_fyi.id
  type     = "CNAME"
  data     = "whitby.tvl.fyi."
  host     = each.key
  for_each = toset(local.whitby_services)
}

# Google Domains mail forwarding configuration (no sending)
resource "glesys_dnsdomain_record" "tvl_fyi_MX_5" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "@"
  type   = "MX"
  data   = "5 gmr-smtp-in.l.google.com."
}

resource "glesys_dnsdomain_record" "tvl_fyi_MX_10" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "@"
  type   = "MX"
  data   = "10 alt1.gmr-smtp-in.l.google.com."
}

resource "glesys_dnsdomain_record" "tvl_fyi_MX_20" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "@"
  type   = "MX"
  data   = "20 alt2.gmr-smtp-in.l.google.com."
}

resource "glesys_dnsdomain_record" "tvl_fyi_MX_30" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "@"
  type   = "MX"
  data   = "30 alt3.aspmx.l.google.com."
}

resource "glesys_dnsdomain_record" "tvl_fyi_MX_40" {
  domain = glesys_dnsdomain.tvl_fyi.id
  host   = "@"
  type   = "MX"
  data   = "40 alt4.gmr-smtp-in.l.google.com."
}