diff --git a/terraform/main.tf b/terraform/main.tf index a4ccd7b..caecace 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -13,7 +13,7 @@ variable "region" { } provider "aws" { - region = "${var.region}" + region = var.region } module "r53" { diff --git a/terraform/modules/r53/main.tf b/terraform/modules/r53/main.tf index 337cca1..6220fde 100644 --- a/terraform/modules/r53/main.tf +++ b/terraform/modules/r53/main.tf @@ -4,7 +4,7 @@ resource "aws_route53_zone" "hashbang" { // A resource "aws_route53_record" "mail-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "mail.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -12,7 +12,7 @@ resource "aws_route53_record" "mail-ipv4" { } resource "aws_route53_record" "sfo1-irc-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "sfo1.irc.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -20,7 +20,7 @@ resource "aws_route53_record" "sfo1-irc-ipv4" { } resource "aws_route53_record" "userdb-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "userdb.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -28,7 +28,7 @@ resource "aws_route53_record" "userdb-ipv4" { } resource "aws_route53_record" "book-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "book.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -37,7 +37,7 @@ resource "aws_route53_record" "book-ipv4" { // GEO resource "aws_route53_record" "irc-ipv4-default" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "irc.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -50,7 +50,7 @@ resource "aws_route53_record" "irc-ipv4-default" { } resource "aws_route53_record" "irc-ipv4-us" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "irc.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -58,9 +58,9 @@ resource "aws_route53_record" "irc-ipv4-us" { set_identifier = "us" geolocation_routing_policy { - continent = "NA" + continent = "NA" } - health_check_id = "${aws_route53_health_check.irc-us.id}" + health_check_id = aws_route53_health_check.irc-us.id } // HEALTHCHECKS @@ -77,14 +77,14 @@ resource "aws_route53_health_check" "irc-us" { } resource "aws_route53_record" "de1-ipv6" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "de1.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2a01:4f8:141:1272::2"] } resource "aws_route53_record" "de1-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "de1.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -92,14 +92,14 @@ resource "aws_route53_record" "de1-ipv4" { } resource "aws_route53_record" "de1-ipv6-wildcard" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "*.de1.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2a01:4f8:141:1272::2"] } resource "aws_route53_record" "de1-ipv4-wildcard" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "*.de1.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -107,14 +107,14 @@ resource "aws_route53_record" "de1-ipv4-wildcard" { } resource "aws_route53_record" "sf1-ipv6" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "sf1.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2a01:4f8:141:1272::2"] } resource "aws_route53_record" "sf1-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "sf1.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -122,14 +122,14 @@ resource "aws_route53_record" "sf1-ipv4" { } resource "aws_route53_record" "sf1-ipv6-wildcard" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "*.sf1.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2a01:4f8:141:1272::2"] } resource "aws_route53_record" "sf1-ipv4-wildcard" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "*.sf1.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -137,14 +137,14 @@ resource "aws_route53_record" "sf1-ipv4-wildcard" { } resource "aws_route53_record" "da1-ipv6" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "da1.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2a01:4f8:141:1272::2"] } resource "aws_route53_record" "da1-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" +zone_id = aws_route53_zone.hashbang.zone_id name = "da1.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -152,14 +152,14 @@ resource "aws_route53_record" "da1-ipv4" { } resource "aws_route53_record" "da1-ipv6-wildcard" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "*.da1.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2a01:4f8:141:1272::2"] } resource "aws_route53_record" "da1-ipv4-wildcard" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "*.da1.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -167,14 +167,14 @@ resource "aws_route53_record" "da1-ipv4-wildcard" { } resource "aws_route53_record" "ny1-ipv6" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "ny1.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2a01:4f8:141:1272::2"] } resource "aws_route53_record" "ny1-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "ny1.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -182,14 +182,14 @@ resource "aws_route53_record" "ny1-ipv4" { } resource "aws_route53_record" "ny1-ipv6-wildcard" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "*.ny1.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2a01:4f8:141:1272::2"] } resource "aws_route53_record" "ny1-ipv4-wildcard" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "*.ny1.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -197,14 +197,14 @@ resource "aws_route53_record" "ny1-ipv4-wildcard" { } resource "aws_route53_record" "to1-ipv6" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "to1.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2a01:4f8:141:1272::2"] } resource "aws_route53_record" "to1-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "to1.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -212,14 +212,14 @@ resource "aws_route53_record" "to1-ipv4" { } resource "aws_route53_record" "to1-ipv6-wildcard" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "*.to1.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2a01:4f8:141:1272::2"] } resource "aws_route53_record" "to1-ipv4-wildcard" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "*.to1.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -227,14 +227,14 @@ resource "aws_route53_record" "to1-ipv4-wildcard" { } resource "aws_route53_record" "im-ipv6" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "im.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2604:a880:1:20::db8:5001"] } resource "aws_route53_record" "im-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "im.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -242,14 +242,14 @@ resource "aws_route53_record" "im-ipv4" { } resource "aws_route53_record" "www-ipv6" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "www.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2604:a880:800:10::1909:a001"] } resource "aws_route53_record" "www-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "www.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -257,29 +257,29 @@ resource "aws_route53_record" "www-ipv4" { } resource "aws_route53_record" "hashbang-ipv6" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" - name = "${aws_route53_zone.hashbang.name}" + zone_id = aws_route53_zone.hashbang.zone_id + name = aws_route53_zone.hashbang.name type = "AAAA" ttl = "1800" records = ["2604:a880:800:10::1909:a001"] } resource "aws_route53_record" "hashbang-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" - name = "${aws_route53_zone.hashbang.name}" + zone_id = aws_route53_zone.hashbang.zone_id + name = aws_route53_zone.hashbang.name type = "A" ttl = "1800" records = ["104.131.13.197"] } resource "aws_route53_record" "nyc3-apps-ipv6" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "nyc3.apps.${aws_route53_zone.hashbang.name}" type = "AAAA" ttl = "1800" records = ["2604:a880:800:10::17cb:1001"] } resource "aws_route53_record" "nyc3-apps-ipv4" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "nyc3.apps.${aws_route53_zone.hashbang.name}" type = "A" ttl = "1800" @@ -288,7 +288,7 @@ resource "aws_route53_record" "nyc3-apps-ipv4" { // TXT resource "aws_route53_record" "dmarc-txt" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "_dmarc.${aws_route53_zone.hashbang.name}" type = "TXT" ttl = "1800" @@ -296,8 +296,8 @@ resource "aws_route53_record" "dmarc-txt" { } resource "aws_route53_record" "hashbang-txt" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" - name = "${aws_route53_zone.hashbang.name}" + zone_id = aws_route53_zone.hashbang.zone_id + name = aws_route53_zone.hashbang.name type = "TXT" ttl = "1800" records = ["v=spf1 +mx -all", @@ -307,7 +307,7 @@ resource "aws_route53_record" "hashbang-txt" { // ALIAS resource "aws_route53_record" "va1-alias" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" + zone_id = aws_route53_zone.hashbang.zone_id name = "va1.${aws_route53_zone.hashbang.name}" type = "CNAME" ttl = "1800" @@ -316,8 +316,8 @@ resource "aws_route53_record" "va1-alias" { // MX resource "aws_route53_record" "mx" { - zone_id = "${aws_route53_zone.hashbang.zone_id}" - name = "${aws_route53_zone.hashbang.name}" + zone_id = aws_route53_zone.hashbang.zone_id + name = aws_route53_zone.hashbang.name type = "MX" ttl = "1800" records = [