orchestration.clouds/ahoskingit/terraform/dns_ahoskingit.tf

140 lines
3.9 KiB
Terraform
Raw Normal View History

2017-01-31 07:51:16 +00:00
#Terraform and its management of DNS in route53
#Setup the domain in route53
resource "aws_route53_zone" "ahoskingit" {
name = "ahoskingit.com"
}
resource "aws_route53_record" "ahoskingit" {
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "ahoskingit.com"
type = "A"
ttl = "5"
2017-01-31 22:15:02 +00:00
records = ["${var.site5_ip}"]
2017-01-31 07:51:16 +00:00
}
2017-01-31 17:43:56 +00:00
resource "aws_route53_record" "ahoskingit_www" {
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "www.ahoskingit.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.ahoskingit.name}"]
}
2017-01-31 07:51:16 +00:00
resource "aws_route53_record" "home_ahoskingit" {
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "home.ahoskingit.com"
type = "A"
ttl = "5"
records = ["${var.home_ip}"]
}
resource "aws_route53_record" "kfa_ahoskingit" {
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "kfa.ahoskingit.com"
type = "A"
ttl = "5"
records = ["${var.kfa_ip}"]
}
resource "aws_route53_record" "lab_ahoskingit" {
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "lab.ahoskingit.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.kfa_ahoskingit.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "inventory_ahoskingit" {
2017-01-31 22:22:57 +00:00
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "inventory.ahoskingit.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "plex_ahoskingit" {
2017-01-31 22:22:57 +00:00
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "plex.ahoskingit.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "ns1_ahoskingit" {
2017-01-31 22:22:57 +00:00
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "ns1.ahoskingit.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "docs_ahoskingit" {
2017-01-31 22:22:57 +00:00
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "docs.ahoskingit.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "cloud_ahoskingit" {
2017-01-31 22:22:57 +00:00
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "cloud.ahoskingit.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "support_ahoskingit" {
2017-01-31 22:22:57 +00:00
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "support.ahoskingit.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "git_ahoskingit" {
2017-01-31 22:22:57 +00:00
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "git.ahoskingit.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "gitlab_ahoskingit" {
2017-01-31 22:22:57 +00:00
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
2017-02-01 06:20:19 +00:00
name = "gitlab"
2017-01-31 22:22:57 +00:00
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit.name}"]
}
2017-01-31 07:51:16 +00:00
#Route53 DNS entry
#resource "aws_route53_record" "www_ahoskingit" {
# zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
# name = "www.ahoskingit.com"
# type = "A"
# ttl = "5"
# records = ["${var.home_ip}"]
#}
2017-01-31 17:43:56 +00:00
# email MX records for DNS
resource "aws_route53_record" "ahoskingit_mx" {
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "${aws_route53_zone.ahoskingit.name}"
type = "MX"
ttl = "60"
records = ["1 ASPMX.L.GOOGLE.COM",
"5 ALT1.ASPMX.L.GOOGLE.COM",
"5 ALT2.ASPMX.L.GOOGLE.COM",
"10 ALT3.ASPMX.L.GOOGLE.COM",
"10 ALT4.ASPMX.L.GOOGLE.COM"]
}
resource "aws_route53_record" "ahoskingit_txt" {
zone_id = "${aws_route53_zone.ahoskingit.zone_id}"
name = "${aws_route53_zone.ahoskingit.name}"
type = "TXT"
ttl = "60"
records = ["google-site-verification=8-QKnBQElI58gnygDWcCzvDGRh31c_bFmNMaSd0fCwE"]
}