orchestration.clouds/ahoskingit/terraform/dns_ahoskingit_ca.tf

124 lines
3.6 KiB
Terraform
Raw Normal View History

2017-01-31 22:26:03 +00:00
#Terraform and its management of DNS in route53
#Setup the domain in route53
resource "aws_route53_zone" "ahoskingit_ca" {
2017-02-01 06:20:19 +00:00
name = "ahoskingit.ca"
2017-01-31 22:26:03 +00:00
}
resource "aws_route53_record" "ahoskingit_ca" {
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "A"
ttl = "5"
records = ["${var.site5_ip}"]
}
resource "aws_route53_record" "ahoskingit_ca_www" {
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "www.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.ahoskingit_ca.name}"]
}
resource "aws_route53_record" "home_ahoskingit_ca" {
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "home.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "A"
ttl = "5"
records = ["${var.home_ip}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "inventory_ahoskingit_ca" {
2017-01-31 22:26:03 +00:00
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "inventory.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit_ca.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "plex_ahoskingit_ca" {
2017-01-31 22:26:03 +00:00
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "plex.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit_ca.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "ns1_ahoskingit_ca" {
2017-01-31 22:26:03 +00:00
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "ns1.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit_ca.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "docs_ahoskingit_ca" {
2017-01-31 22:26:03 +00:00
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "docs.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit_ca.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "cloud_ahoskingit_ca" {
2017-01-31 22:26:03 +00:00
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "cloud.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit_ca.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "support_ahoskingit_ca" {
2017-01-31 22:26:03 +00:00
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "support.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit_ca.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "git_ahoskingit_ca" {
2017-01-31 22:26:03 +00:00
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "git.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit_ca.name}"]
}
2017-02-01 06:20:19 +00:00
resource "aws_route53_record" "gitlab_ahoskingit_ca" {
2017-01-31 22:26:03 +00:00
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
name = "gitlab.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.home_ahoskingit_ca.name}"]
}
2017-02-01 06:20:19 +00:00
##Route53 DNS entry
2017-01-31 22:26:03 +00:00
#resource "aws_route53_record" "www_ahoskingit_ca" {
# zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
2017-02-01 06:20:19 +00:00
# name = "www.ahoskingit.ca"
2017-01-31 22:26:03 +00:00
# type = "A"
# ttl = "5"
# records = ["${var.home_ip}"]
#}
# email MX records for DNS
resource "aws_route53_record" "ahoskingit_ca_mx" {
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
name = "${aws_route53_zone.ahoskingit_ca.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_ca_txt" {
zone_id = "${aws_route53_zone.ahoskingit_ca.zone_id}"
name = "${aws_route53_zone.ahoskingit_ca.name}"
type = "TXT"
ttl = "60"
records = ["google-site-verification=BgSCW0dvRYo4wR3l4ubjfq--VXsv554GIxgCDTyMK78"]
}