-
Notifications
You must be signed in to change notification settings - Fork 0
/
devser-route53.tf
81 lines (72 loc) · 2.33 KB
/
devser-route53.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
resource "aws_route53_zone" "primary" {
name = "devser.net"
}
resource "aws_route53_record" "mail-devser" {
zone_id = aws_route53_zone.primary.zone_id
name = "mail.devser.net"
type = "A"
ttl = 300
records = ["173.236.95.66"]
}
resource "aws_route53_record" "mx-devser" {
zone_id = aws_route53_zone.primary.zone_id
name = "devser.net"
type = "MX"
ttl = 300
records = ["0 mail.devser.net"]
}
resource "aws_route53_record" "spf-devser" {
zone_id = aws_route53_zone.primary.zone_id
name = "devser.net"
type = "TXT"
ttl = 300
records = ["v=spf1 +a +mx +ip4:173.236.95.66 ~all"]
}
resource "aws_route53_record" "_dmarc-devser" {
zone_id = aws_route53_zone.primary.zone_id
name = "_dmarc.devser.net"
type = "TXT"
ttl = 300
records = ["v=DMARC1; p=quarantine; rua=mailto: [email protected];"]
}
locals {
dkim_record = "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyEDgcXtKdC5/13z1ipSB4WAf26Lpwf44xM9rlxne07lJ13fU+D9Tuu0/zGYFsQQojcChF6DfWaGWIvTofCDw8HR3fcVChn23Z3GPc5WDfjhc5G8p0CUwl2qMAUzpET81ngDClemtokJ4FppAcl/DT5jPaDrQDvrHUx31MFIT5IbZKJPDIWQdKYi6ojH7aHXvjxFsBz0w3LeSS9Tma+DUEltSUHA/4ssayP6oh9CJZaeIB3V+U5euagpQMIq3lpE8hdGc/i387yI0LfiIs1NKrE9RJQexnSce6g63qpovSTGyidqkV6RvVGT5mqUk9Ahqwgl2fHcyyE1d0xd9lOs/swIDAQAB;"
zone_id = "aws_route53_zone.primary.zone_id"
domain = "default._domainkey.devser.net"
}
resource "aws_route53_record" "dkim-devser" {
zone_id = aws_route53_zone.primary.zone_id
name = "default._domainkey.devser.net"
type = "TXT"
ttl = 300
records = [
join("\"\"", [
substr(local.dkim_record, 0, 255),
substr(local.dkim_record, 255, 255),
])
]
}
resource "aws_route53_record" "mockups-devser" {
zone_id = aws_route53_zone.primary.zone_id
name = "mockups.devser.net"
type = "A"
ttl = 300
records = ["173.236.95.66"]
}
resource "aws_route53_record" "phpmyadmin-devser" {
zone_id = aws_route53_zone.primary.zone_id
name = "db.devser.net"
type = "A"
alias {
name = aws_lb.ecs_alb.dns_name
zone_id = aws_lb.ecs_alb.zone_id
evaluate_target_health = true
}
}
resource "aws_route53_record" "legacy-devser" {
zone_id = aws_route53_zone.primary.zone_id
name = "*.devser.net"
type = "A"
ttl = 300
records = ["3.234.57.68"]
}