Skip to content

Commit

Permalink
terraform: describe the nixos.org records in route53
Browse files Browse the repository at this point in the history
Right now the DNS is hosted on the udag.org servers and not directly
changeable with code.
  • Loading branch information
zimbatm committed Dec 16, 2018
1 parent dc40cde commit 1eb9ffa
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions terraform/route53.tf
@@ -0,0 +1,85 @@
locals {
host_bastion = "34.254.208.229"
host_chef = "46.4.67.10"
host_www = "54.217.220.47"
}

resource "aws_route53_zone" "nixos" {
name = "nixos.org"
}

resource "aws_route53_record" "nixos-mx" {
zone_id = "${aws_route53_zone.nixos.zone_id}"
name = ""
type = "MX"
ttl = "14300"

records = [
"10 mx00.udag.de.",
"20 mx01.udag.de.",
]
}

resource "aws_route53_record" "nixos-naked" {
zone_id = "${aws_route53_zone.nixos.zone_id}"
name = ""
type = "A"
ttl = "500"
records = ["${local.host_www}"]
}

resource "aws_route53_record" "nixos-www" {
zone_id = "${aws_route53_zone.nixos.zone_id}"
name = "www"
type = "A"
ttl = "500"
records = ["${local.host_www}"]
}

resource "aws_route53_record" "nixos-wild" {
zone_id = "${aws_route53_zone.nixos.zone_id}"
name = "*"
type = "A"
ttl = "500"
records = ["${local.host_www}"]
}

resource "aws_route53_record" "nixos-tarballs" {
zone_id = "${aws_route53_zone.nixos.zone_id}"
name = "tarballs"
type = "CNAME"
ttl = "3600"
records = ["d3am6xf9zisc71.cloudfront.net"]
}

resource "aws_route53_record" "nixos-cache" {
zone_id = "${aws_route53_zone.nixos.zone_id}"
name = "tarballs"
type = "CNAME"
ttl = "3600"
records = ["dualstack.v2.shared.global.fastly.net"]
}

resource "aws_route53_record" "nixos-bastion" {
zone_id = "${aws_route53_zone.nixos.zone_id}"
name = "bastion"
type = "A"
ttl = "600"
records = ["${local.host_bastion}"]
}

resource "aws_route53_record" "nixos-hydra-v4" {
zone_id = "${aws_route53_zone.nixos.zone_id}"
name = "hydra"
type = "A"
ttl = "3600"
records = ["${local.host_chef}"]
}

resource "aws_route53_record" "nixos-hydra-v6" {
zone_id = "${aws_route53_zone.nixos.zone_id}"
name = "hydra"
type = "AAAA"
ttl = "3600"
records = ["2a01:4f8:140:248f::"]
}

0 comments on commit 1eb9ffa

Please sign in to comment.