-
Notifications
You must be signed in to change notification settings - Fork 2
/
route53.tf
48 lines (40 loc) · 1.19 KB
/
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
# resource "aws_route53_zone" "cognoma" {
# name = "cognoma.org"
# }
variable "cognoma-domain" {
default = "cognoma.org"
}
data "aws_route53_zone" "cognoma" {
zone_id = "Z2GDAYII3P3OEX"
}
resource "aws_ses_domain_identity" "cognoma" {
domain = "${var.cognoma-domain}"
}
resource "aws_route53_record" "cognoma-api" {
zone_id = "${data.aws_route53_zone.cognoma.zone_id}"
name = "api.${var.cognoma-domain}"
type = "A"
alias {
name = "${aws_elb.cognoma-nginx.dns_name}"
zone_id = "${aws_elb.cognoma-nginx.zone_id}"
evaluate_target_health = true
}
}
resource "aws_route53_record" "cognoma-dot-org" {
name = "${var.cognoma-domain}"
zone_id = "${data.aws_route53_zone.cognoma.zone_id}"
type = "A"
alias {
name = "${aws_s3_bucket.cognoma-static.website_domain}"
zone_id = "${aws_s3_bucket.cognoma-static.hosted_zone_id}"
evaluate_target_health = true
}
depends_on = ["aws_s3_bucket.cognoma-static"]
}
resource "aws_route53_record" "cognoma-ses-verification-record" {
zone_id = "${data.aws_route53_zone.cognoma.zone_id}"
name = "${var.cognoma-domain}"
type = "TXT"
ttl = "5"
records = ["${aws_ses_domain_identity.cognoma.verification_token}"]
}