Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform: Migrate toward Terraform v0.12 syntax. #170

Merged
merged 2 commits into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ variable "region" {
}

provider "aws" {
region = "${var.region}"
region = var.region
}

module "r53" {
Expand Down
88 changes: 44 additions & 44 deletions terraform/modules/r53/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ 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"
records = ["104.236.46.93"]
}

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"
records = ["107.170.252.157"]
}

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"
records = ["157.245.24.99"]
}

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"
Expand All @@ -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"
Expand All @@ -50,17 +50,17 @@ 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"
records = ["107.170.252.157"]

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
Expand All @@ -77,209 +77,209 @@ 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"
records = ["46.4.114.111"]
}

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"
records = ["46.4.114.111"]
}

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"
records = ["46.4.114.111"]
}

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"
records = ["46.4.114.111"]
}

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"
records = ["46.4.114.111"]
}

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"
records = ["46.4.114.111"]
}

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"
records = ["46.4.114.111"]
}

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"
records = ["46.4.114.111"]
}

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"
records = ["46.4.114.111"]
}

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"
records = ["46.4.114.111"]
}

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"
records = ["107.170.254.61"]
}

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"
records = ["104.131.13.197"]
}

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"
Expand All @@ -288,16 +288,16 @@ 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"
records = ["v=DMARC1; p=none; pct=100; rua=mailto:[email protected]; sp=none; aspf=s;"]
}

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",
Expand 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"
Expand All @@ -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 = [
Expand Down