This repository was archived by the owner on Mar 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdns.tf
58 lines (50 loc) · 1.4 KB
/
dns.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
resource "desec_domain" "root" {
name = var.dns_root
}
# Sub-Zones
resource "desec_rrset" "infra_ds" {
domain = desec_domain.root.name
subname = "infra"
type = "DS"
records = var.dns_infra_ds
ttl = 3600
}
# Services
resource "desec_rrset" "root_services_wildcard_a" {
domain = desec_domain.root.name
subname = "*.s"
type = "A"
# This should be a list of all VMs acting as reverse proxies
# TODO: automatically generate this by iterating through all VMs
records = [
module.orchestrator_gcp_us_west1_a_1.public_ipv4,
module.worker_gcp_us_west1_a_2.public_ipv4,
]
ttl = 3600
}
# SendGrid DNS challenge
# Needed for fider.sargassum.world
# TODO: can we make Terraform obtain the subnames and records to set from SendGrid?
resource "desec_rrset" "sendgrid_cname" {
domain = desec_domain.root.name
subname = "em7308"
type = "CNAME"
records = ["u29124363.wl114.sendgrid.net."]
ttl = 3600
}
# Needed for fider.sargassum.world
resource "desec_rrset" "sendgrid1_cname" {
domain = desec_domain.root.name
subname = "s1._domainkey"
type = "CNAME"
records = ["s1.domainkey.u29124363.wl114.sendgrid.net."]
ttl = 3600
}
# Needed for fider.sargassum.world
resource "desec_rrset" "sendgrid2_cname" {
domain = desec_domain.root.name
subname = "s2._domainkey"
type = "CNAME"
records = ["s2.domainkey.u29124363.wl114.sendgrid.net."]
ttl = 3600
}