generated from SkypLabs-Ltd/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
145 lines (142 loc) · 2.73 KB
/
main.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
locals {
zone = "zerowastesgp.fr"
dns_records = [
# -------------------------------------------------- #
# DNS zone configuration
# -------------------------------------------------- #
{
name = ""
type = "NS"
ttl = 0,
targets = [
"dns100.ovh.net.",
"ns100.ovh.net.",
]
},
# See https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/#configure-an-apex-domain.
{
name = ""
type = "A"
ttl = 0,
targets = [
"104.198.14.52",
]
},
# See https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/#configure-a-subdomain.
{
name = "www"
type = "CNAME"
ttl = 0,
targets = [
"zerowaste-sgp-www.netlify.app.",
]
},
# -------------------------------------------------- #
# Email configuration
# -------------------------------------------------- #
{
name = ""
type = "MX"
ttl = 0,
targets = [
"1 redirect.ovh.net.",
]
},
{
name = "autoconfig"
type = "CNAME"
ttl = 0,
targets = [
"mailconfig.ovh.net.",
]
},
{
name = "autodiscover"
type = "CNAME"
ttl = 0,
targets = [
"mailconfig.ovh.net.",
]
},
{
name = "mail"
type = "CNAME"
ttl = 0,
targets = [
"ssl0.ovh.net.",
]
},
{
name = "pop3"
type = "CNAME"
ttl = 0,
targets = [
"ssl0.ovh.net.",
]
},
{
name = "imap"
type = "CNAME"
ttl = 0,
targets = [
"ssl0.ovh.net.",
]
},
{
name = "smtp"
type = "CNAME"
ttl = 0,
targets = [
"ssl0.ovh.net.",
]
},
{
name = "_autodiscover._tcp"
type = "SRV"
ttl = 0,
targets = [
"0 0 443 mailconfig.ovh.net.",
]
},
{
name = "_imaps._tcp"
type = "SRV"
ttl = 0,
targets = [
"0 0 993 ssl0.ovh.net.",
]
},
{
name = "_submission._tcp"
type = "SRV"
ttl = 0,
targets = [
"0 0 465 ssl0.ovh.net.",
]
},
{
name = ""
type = "SPF"
ttl = 600,
targets = [
"\"v=spf1 include:mx.ovh.com ~all\"",
]
},
# -------------------------------------------------- #
# Domain verification
# -------------------------------------------------- #
{
name = "_github-challenge-zerowastesgp"
type = "TXT"
ttl = 0,
targets = [
"\"c50ef36f27\"",
]
},
]
}
module "dns_records" {
source = "./modules/ovh-dns"
zone = local.zone
records = local.dns_records
}