Add AutomatedBytes to R53

This commit is contained in:
Alexander Hosking 2017-06-29 01:21:12 -04:00
parent f8819d6fab
commit 7d51f413cb
4 changed files with 388 additions and 45 deletions

View File

@ -1,37 +1,58 @@
##Terraform and its management of DNS in route53
#### automatedbytes.com
##Setup the domain in route53
#resource "aws_route53_zone" "automatedbytes" {
# name = "automatedbytes.com"
#}
#
##Route53 DNS entry
#resource "aws_route53_record" "automatedbytes" {
# zone_id = "${aws_route53_zone.automatedbytes.zone_id}"
# name = "automatedbytes.com"
# type = "A"
# ttl = "5"
# records = ["${var.home_ip}"]
#}
#
#resource "aws_route53_record" "www_automatedbytes" {
# zone_id = "${aws_route53_zone.automatedbytes.zone_id}"
# name = "www.automatedbytes.com"
# type = "CNAME"
# ttl = "5"
# records = ["${aws_route53_record.automatedbytes.name}"]
#}
#
#resource "aws_route53_record" "wildcard_automatedbytes" {
# zone_id = "${aws_route53_zone.automatedbytes.zone_id}"
# name = "*.automatedbytes.com"
# type = "CNAME"
# ttl = "5"
# records = ["${aws_route53_record.automatedbytes.name}"]
#}
#
#### automatedbytes.ca
##Setup the domain in route53
resource "aws_route53_zone" "automatedbytes" {
name = "automatedbytes.com"
}
#Route53 DNS entry
resource "aws_route53_record" "automatedbytes" {
zone_id = "${aws_route53_zone.automatedbytes.zone_id}"
name = "automatedbytes.com"
type = "A"
ttl = "5"
records = ["${var.vultr_ip}"]
}
resource "aws_route53_record" "www_automatedbytes" {
zone_id = "${aws_route53_zone.automatedbytes.zone_id}"
name = "www.automatedbytes.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.automatedbytes.name}"]
}
resource "aws_route53_record" "wildcard_automatedbytes" {
zone_id = "${aws_route53_zone.automatedbytes.zone_id}"
name = "*.automatedbytes.com"
type = "CNAME"
ttl = "5"
records = ["${aws_route53_record.automatedbytes.name}"]
}
resource "aws_route53_record" "support_automatedbytes" {
zone_id = "${aws_route53_zone.automatedbytes.zone_id}"
name = "support.automatedbytes.com"
type = "CNAME"
ttl = "5"
records = ["${var.home_ip}"]
}
## Email MX records
resource "aws_route53_record" "mx_automatedbytes" {
zone_id = "${aws_route53_zone.automatedbytes.zone_id}"
name = "${aws_route53_zone.automatedbytes.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"]
}
### automatedbytes.ca
#Setup the domain in route53
#resource "aws_route53_zone" "automatedbytes_ca" {
# name = "automatedbytes.ca"
#}

View File

@ -1,7 +1,7 @@
{
"version": 3,
"terraform_version": "0.8.8",
"serial": 13,
"terraform_version": "0.9.8",
"serial": 16,
"lineage": "db7d87ff-3078-47ed-a0a9-91749a2dbba5",
"modules": [
{
@ -40,7 +40,6 @@
"aws_route53_record.ahosking_mx": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.ahosking",
"aws_route53_zone.ahosking"
],
"primary": {
@ -181,7 +180,6 @@
"aws_route53_record.ahoskingit_ca_mx": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.ahoskingit_ca",
"aws_route53_zone.ahoskingit_ca"
],
"primary": {
@ -213,7 +211,6 @@
"aws_route53_record.ahoskingit_ca_txt": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.ahoskingit_ca",
"aws_route53_zone.ahoskingit_ca"
],
"primary": {
@ -269,7 +266,6 @@
"aws_route53_record.ahoskingit_mx": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.ahoskingit",
"aws_route53_zone.ahoskingit"
],
"primary": {
@ -301,7 +297,6 @@
"aws_route53_record.ahoskingit_txt": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.ahoskingit",
"aws_route53_zone.ahoskingit"
],
"primary": {
@ -354,6 +349,33 @@
"deposed": [],
"provider": ""
},
"aws_route53_record.automatedbytes": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.automatedbytes"
],
"primary": {
"id": "Z1H1ULBVLBNLL2_automatedbytes.com_A",
"attributes": {
"fqdn": "automatedbytes.com",
"health_check_id": "",
"id": "Z1H1ULBVLBNLL2_automatedbytes.com_A",
"name": "automatedbytes.com",
"records.#": "1",
"records.1457497029": "45.63.19.159",
"set_identifier": "",
"ttl": "5",
"type": "A",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_record.baby_ahoskingit": {
"type": "aws_route53_record",
"depends_on": [
@ -770,6 +792,37 @@
"deposed": [],
"provider": ""
},
"aws_route53_record.mx_automatedbytes": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.automatedbytes"
],
"primary": {
"id": "Z1H1ULBVLBNLL2_automatedbytes.com_MX",
"attributes": {
"fqdn": "automatedbytes.com",
"health_check_id": "",
"id": "Z1H1ULBVLBNLL2_automatedbytes.com_MX",
"name": "automatedbytes.com",
"records.#": "5",
"records.2553098020": "5 ALT2.ASPMX.L.GOOGLE.COM",
"records.299078338": "1 ASPMX.L.GOOGLE.COM",
"records.3330381287": "10 ALT4.ASPMX.L.GOOGLE.COM",
"records.667235188": "10 ALT3.ASPMX.L.GOOGLE.COM",
"records.931422958": "5 ALT1.ASPMX.L.GOOGLE.COM",
"set_identifier": "",
"ttl": "60",
"type": "MX",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_record.ns1_ahoskingit": {
"type": "aws_route53_record",
"depends_on": [
@ -966,6 +1019,89 @@
"deposed": [],
"provider": ""
},
"aws_route53_record.support_automatedbytes": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.automatedbytes"
],
"primary": {
"id": "Z1H1ULBVLBNLL2_support.automatedbytes.com_CNAME",
"attributes": {
"fqdn": "support.automatedbytes.com",
"health_check_id": "",
"id": "Z1H1ULBVLBNLL2_support.automatedbytes.com_CNAME",
"name": "support.automatedbytes.com",
"records.#": "1",
"records.2764920476": "174.114.190.249",
"set_identifier": "",
"ttl": "5",
"type": "CNAME",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_record.wildcard_automatedbytes": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_record.automatedbytes",
"aws_route53_zone.automatedbytes"
],
"primary": {
"id": "Z1H1ULBVLBNLL2_*.automatedbytes.com_CNAME",
"attributes": {
"fqdn": "*.automatedbytes.com",
"health_check_id": "",
"id": "Z1H1ULBVLBNLL2_*.automatedbytes.com_CNAME",
"name": "*.automatedbytes.com",
"records.#": "1",
"records.805578271": "automatedbytes.com",
"set_identifier": "",
"ttl": "5",
"type": "CNAME",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_record.www_automatedbytes": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_record.automatedbytes",
"aws_route53_zone.automatedbytes"
],
"primary": {
"id": "Z1H1ULBVLBNLL2_www.automatedbytes.com_CNAME",
"attributes": {
"fqdn": "www.automatedbytes.com",
"health_check_id": "",
"id": "Z1H1ULBVLBNLL2_www.automatedbytes.com_CNAME",
"name": "www.automatedbytes.com",
"records.#": "1",
"records.805578271": "automatedbytes.com",
"set_identifier": "",
"ttl": "5",
"type": "CNAME",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_zone.ahosking": {
"type": "aws_route53_zone",
"depends_on": [],
@ -1037,6 +1173,30 @@
},
"deposed": [],
"provider": ""
},
"aws_route53_zone.automatedbytes": {
"type": "aws_route53_zone",
"depends_on": [],
"primary": {
"id": "Z1H1ULBVLBNLL2",
"attributes": {
"comment": "Managed by Terraform",
"force_destroy": "false",
"id": "Z1H1ULBVLBNLL2",
"name": "automatedbytes.com",
"name_servers.#": "4",
"name_servers.0": "ns-1094.awsdns-08.org",
"name_servers.1": "ns-1780.awsdns-30.co.uk",
"name_servers.2": "ns-456.awsdns-57.com",
"name_servers.3": "ns-817.awsdns-38.net",
"tags.%": "0",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {},
"tainted": false
},
"deposed": [],
"provider": ""
}
},
"depends_on": []

View File

@ -1,7 +1,7 @@
{
"version": 3,
"terraform_version": "0.8.8",
"serial": 12,
"terraform_version": "0.9.8",
"serial": 15,
"lineage": "db7d87ff-3078-47ed-a0a9-91749a2dbba5",
"modules": [
{
@ -40,7 +40,6 @@
"aws_route53_record.ahosking_mx": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.ahosking",
"aws_route53_zone.ahosking"
],
"primary": {
@ -181,7 +180,6 @@
"aws_route53_record.ahoskingit_ca_mx": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.ahoskingit_ca",
"aws_route53_zone.ahoskingit_ca"
],
"primary": {
@ -213,7 +211,6 @@
"aws_route53_record.ahoskingit_ca_txt": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.ahoskingit_ca",
"aws_route53_zone.ahoskingit_ca"
],
"primary": {
@ -269,7 +266,6 @@
"aws_route53_record.ahoskingit_mx": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.ahoskingit",
"aws_route53_zone.ahoskingit"
],
"primary": {
@ -301,7 +297,6 @@
"aws_route53_record.ahoskingit_txt": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.ahoskingit",
"aws_route53_zone.ahoskingit"
],
"primary": {
@ -354,6 +349,33 @@
"deposed": [],
"provider": ""
},
"aws_route53_record.automatedbytes": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.automatedbytes"
],
"primary": {
"id": "Z1H1ULBVLBNLL2_automatedbytes.com_A",
"attributes": {
"fqdn": "automatedbytes.com",
"health_check_id": "",
"id": "Z1H1ULBVLBNLL2_automatedbytes.com_A",
"name": "automatedbytes.com",
"records.#": "1",
"records.1457497029": "45.63.19.159",
"set_identifier": "",
"ttl": "5",
"type": "A",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_record.baby_ahoskingit": {
"type": "aws_route53_record",
"depends_on": [
@ -826,6 +848,34 @@
"deposed": [],
"provider": ""
},
"aws_route53_record.office_ahoskingit": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_record.home_ahoskingit",
"aws_route53_zone.ahoskingit"
],
"primary": {
"id": "Z2HTSYFXB5HXD9_office.ahoskingit.com_CNAME",
"attributes": {
"fqdn": "office.ahoskingit.com",
"health_check_id": "",
"id": "Z2HTSYFXB5HXD9_office.ahoskingit.com_CNAME",
"name": "office.ahoskingit.com",
"records.#": "1",
"records.1011144593": "home.ahoskingit.com",
"set_identifier": "",
"ttl": "5",
"type": "CNAME",
"zone_id": "Z2HTSYFXB5HXD9"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_record.plex_ahoskingit": {
"type": "aws_route53_record",
"depends_on": [
@ -938,6 +988,89 @@
"deposed": [],
"provider": ""
},
"aws_route53_record.support_automatedbytes": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_zone.automatedbytes"
],
"primary": {
"id": "Z1H1ULBVLBNLL2_support.automatedbytes.com_CNAME",
"attributes": {
"fqdn": "support.automatedbytes.com",
"health_check_id": "",
"id": "Z1H1ULBVLBNLL2_support.automatedbytes.com_CNAME",
"name": "support.automatedbytes.com",
"records.#": "1",
"records.2764920476": "174.114.190.249",
"set_identifier": "",
"ttl": "5",
"type": "CNAME",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_record.wildcard_automatedbytes": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_record.automatedbytes",
"aws_route53_zone.automatedbytes"
],
"primary": {
"id": "Z1H1ULBVLBNLL2_*.automatedbytes.com_CNAME",
"attributes": {
"fqdn": "*.automatedbytes.com",
"health_check_id": "",
"id": "Z1H1ULBVLBNLL2_*.automatedbytes.com_CNAME",
"name": "*.automatedbytes.com",
"records.#": "1",
"records.805578271": "automatedbytes.com",
"set_identifier": "",
"ttl": "5",
"type": "CNAME",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_record.www_automatedbytes": {
"type": "aws_route53_record",
"depends_on": [
"aws_route53_record.automatedbytes",
"aws_route53_zone.automatedbytes"
],
"primary": {
"id": "Z1H1ULBVLBNLL2_www.automatedbytes.com_CNAME",
"attributes": {
"fqdn": "www.automatedbytes.com",
"health_check_id": "",
"id": "Z1H1ULBVLBNLL2_www.automatedbytes.com_CNAME",
"name": "www.automatedbytes.com",
"records.#": "1",
"records.805578271": "automatedbytes.com",
"set_identifier": "",
"ttl": "5",
"type": "CNAME",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {
"schema_version": "2"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_zone.ahosking": {
"type": "aws_route53_zone",
"depends_on": [],
@ -1009,6 +1142,30 @@
},
"deposed": [],
"provider": ""
},
"aws_route53_zone.automatedbytes": {
"type": "aws_route53_zone",
"depends_on": [],
"primary": {
"id": "Z1H1ULBVLBNLL2",
"attributes": {
"comment": "Managed by Terraform",
"force_destroy": "false",
"id": "Z1H1ULBVLBNLL2",
"name": "automatedbytes.com",
"name_servers.#": "4",
"name_servers.0": "ns-1094.awsdns-08.org",
"name_servers.1": "ns-1780.awsdns-30.co.uk",
"name_servers.2": "ns-456.awsdns-57.com",
"name_servers.3": "ns-817.awsdns-38.net",
"tags.%": "0",
"zone_id": "Z1H1ULBVLBNLL2"
},
"meta": {},
"tainted": false
},
"deposed": [],
"provider": ""
}
},
"depends_on": []

View File

@ -14,6 +14,11 @@ variable "site5_ip" {
default = "138.197.154.98"
}
#Automated Bytes current web host
variable "vultr_ip" {
default = "45.63.19.159"
}
## KFA IP
variable "kfa_ip" {
default = "76.9.203.226"