50 lines
1.2 KiB
Terraform
50 lines
1.2 KiB
Terraform
|
#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"
|
||
|
records = ["104.37.195.87"]
|
||
|
}
|
||
|
|
||
|
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}"]
|
||
|
}
|
||
|
|
||
|
|
||
|
#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}"]
|
||
|
#}
|
||
|
|