2017-01-31 07:51:16 +00:00
|
|
|
#Terraform and its management of DNS in route53
|
|
|
|
|
|
|
|
#Setup the domain in route53
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_zone" "ahoskingit_com" {
|
|
|
|
zone = "ahoskingit.com"
|
2019-12-29 06:57:42 +00:00
|
|
|
plan = "free"
|
2017-01-31 07:51:16 +00:00
|
|
|
}
|
|
|
|
|
2019-06-10 05:54:16 +00:00
|
|
|
resource "cloudflare_record" "ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2017-01-31 07:51:16 +00:00
|
|
|
name = "ahoskingit.com"
|
|
|
|
type = "A"
|
2019-06-10 05:54:16 +00:00
|
|
|
ttl = "1"
|
2019-12-29 06:57:42 +00:00
|
|
|
value = var.site5_ip
|
2019-06-10 05:54:16 +00:00
|
|
|
proxied = "true"
|
2017-01-31 07:51:16 +00:00
|
|
|
}
|
|
|
|
|
2019-06-10 05:54:16 +00:00
|
|
|
resource "cloudflare_record" "ahoskingit_www" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-10 05:54:16 +00:00
|
|
|
name = "www"
|
2017-01-31 17:43:56 +00:00
|
|
|
type = "CNAME"
|
2019-12-29 07:15:42 +00:00
|
|
|
value = cloudflare_record.ahoskingit.name
|
2019-06-10 05:54:16 +00:00
|
|
|
proxied = "true"
|
2017-01-31 17:43:56 +00:00
|
|
|
}
|
|
|
|
|
2019-06-13 03:44:11 +00:00
|
|
|
resource "cloudflare_record" "ahoskingit_influx" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-13 03:44:11 +00:00
|
|
|
name = "influx"
|
|
|
|
type = "CNAME"
|
2019-12-29 07:15:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2019-06-13 03:44:11 +00:00
|
|
|
proxied = "true"
|
|
|
|
}
|
|
|
|
|
|
|
|
#resource "cloudflare_record" "ahoskingit_wildcard" {
|
|
|
|
# domain = "ahoskingit.com"
|
|
|
|
# name = "*"
|
|
|
|
# type = "A"
|
2019-12-29 06:57:42 +00:00
|
|
|
# value = var.home_ip
|
2019-06-13 03:44:11 +00:00
|
|
|
# proxied = "true" #A records cannot be proxied if wildcard
|
|
|
|
#}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "ahoskingit_plex" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "plex.ahoskingit.com"
|
|
|
|
type = "CNAME"
|
2019-12-29 07:15:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = "true"
|
2017-01-31 07:51:16 +00:00
|
|
|
}
|
|
|
|
|
2020-07-24 05:46:48 +00:00
|
|
|
resource "cloudflare_record" "ahoskingit_recipes" {
|
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
|
|
|
name = "recipes.ahoskingit.com"
|
|
|
|
type = "CNAME"
|
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
|
|
|
proxied = "true"
|
|
|
|
}
|
|
|
|
|
2021-01-08 05:14:41 +00:00
|
|
|
resource "cloudflare_record" "ahoskingit_food" {
|
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
|
|
|
name = "food.ahoskingit.com"
|
|
|
|
type = "CNAME"
|
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
|
|
|
proxied = "true"
|
|
|
|
}
|
|
|
|
|
2020-10-16 14:42:54 +00:00
|
|
|
resource "cloudflare_record" "ahoskingit_jumbledev" {
|
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
|
|
|
name = "jumbledev.ahoskingit.com"
|
|
|
|
type = "CNAME"
|
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
|
|
|
proxied = "true"
|
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "home_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "home"
|
2017-06-09 23:37:49 +00:00
|
|
|
type = "A"
|
2019-12-29 06:57:42 +00:00
|
|
|
value = var.home_ip
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = "true"
|
2017-06-09 23:37:49 +00:00
|
|
|
}
|
2019-12-29 06:57:42 +00:00
|
|
|
### Home Subdomains ###
|
2020-01-05 05:37:30 +00:00
|
|
|
resource "cloudflare_record" "smart_home_ahoskingit" {
|
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2021-05-21 21:20:04 +00:00
|
|
|
name = "smart"
|
2020-01-05 05:37:30 +00:00
|
|
|
type = "CNAME"
|
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
|
|
|
proxied = "true"
|
|
|
|
}
|
|
|
|
|
2019-12-29 06:57:42 +00:00
|
|
|
resource "cloudflare_record" "temps_home_ahoskingit" {
|
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2021-05-21 21:20:04 +00:00
|
|
|
name = "temperatures"
|
2020-01-05 05:37:30 +00:00
|
|
|
type = "CNAME"
|
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
|
|
|
# value = var.home_ip
|
2019-12-29 06:57:42 +00:00
|
|
|
proxied = "true"
|
|
|
|
}
|
|
|
|
### END Home Subdomains ###
|
2017-06-09 23:37:49 +00:00
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "kfa_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "kfa"
|
2017-01-31 07:51:16 +00:00
|
|
|
type = "A"
|
2019-12-29 06:57:42 +00:00
|
|
|
value = var.kfa_ip
|
2017-01-31 07:51:16 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "lab_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "lab"
|
2017-01-31 07:51:16 +00:00
|
|
|
type = "CNAME"
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2019-12-29 07:15:42 +00:00
|
|
|
value = join(".", [cloudflare_record.kfa_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2017-01-31 07:51:16 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "logs_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "logs"
|
2019-06-07 19:24:02 +00:00
|
|
|
type = "A"
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2019-12-29 06:57:42 +00:00
|
|
|
value = var.home_ip
|
2019-05-14 12:08:45 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "inventory_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "inventory"
|
2017-01-31 22:22:57 +00:00
|
|
|
type = "CNAME"
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2019-12-29 06:57:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2017-01-31 22:22:57 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
# resource "cloudflare_record" "requests_plex_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
# zone_id = cloudflare_zone.ahoskingit_com
|
2019-06-14 03:15:54 +00:00
|
|
|
# name = "requests.plex"
|
|
|
|
# type = "CNAME"
|
|
|
|
# proxied = true
|
2019-12-29 06:57:42 +00:00
|
|
|
# value = "cloudflare_record.home_ahoskingit.name"
|
2019-06-14 03:15:54 +00:00
|
|
|
# }
|
2017-01-31 22:22:57 +00:00
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "ns1_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "ns1"
|
2017-01-31 22:22:57 +00:00
|
|
|
type = "CNAME"
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2019-12-29 06:57:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2017-01-31 22:22:57 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "docs_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "docs"
|
2017-01-31 22:22:57 +00:00
|
|
|
type = "CNAME"
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2019-12-29 06:57:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2017-01-31 22:22:57 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "cloud_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "cloud"
|
2017-01-31 22:22:57 +00:00
|
|
|
type = "CNAME"
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2019-12-29 06:57:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2017-01-31 22:22:57 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "goals_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "goals"
|
2019-02-09 06:08:52 +00:00
|
|
|
type = "CNAME"
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2019-12-29 06:57:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2019-02-09 06:08:52 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "office_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "office"
|
2017-06-09 23:37:49 +00:00
|
|
|
type = "CNAME"
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2019-12-29 06:57:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2017-06-09 23:37:49 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "support_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "support"
|
2017-01-31 22:22:57 +00:00
|
|
|
type = "CNAME"
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2019-12-29 06:57:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2017-01-31 22:22:57 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "git_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "git"
|
2019-06-15 03:56:57 +00:00
|
|
|
type = "A"
|
2019-12-29 06:57:42 +00:00
|
|
|
value = var.home_ip
|
2019-06-15 03:56:57 +00:00
|
|
|
#proxied = "true"
|
2017-01-31 22:22:57 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "gitlab_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2017-02-01 06:20:19 +00:00
|
|
|
name = "gitlab"
|
2017-01-31 22:22:57 +00:00
|
|
|
type = "CNAME"
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2019-12-29 06:57:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2018-02-12 10:58:22 +00:00
|
|
|
}
|
|
|
|
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "monitors_ahoskingit" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-06-14 03:15:54 +00:00
|
|
|
name = "monitors"
|
2018-02-12 10:58:22 +00:00
|
|
|
type = "CNAME"
|
2019-12-29 06:57:42 +00:00
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
2019-06-14 03:15:54 +00:00
|
|
|
proxied = true
|
2017-01-31 22:22:57 +00:00
|
|
|
}
|
2017-01-31 07:51:16 +00:00
|
|
|
|
2017-01-31 17:43:56 +00:00
|
|
|
# email MX records for DNS
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_record" "ahoskingit_com_mx" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-12-29 07:15:42 +00:00
|
|
|
name = cloudflare_zone.ahoskingit_com.zone
|
2019-06-14 03:15:54 +00:00
|
|
|
type = "MX"
|
|
|
|
value = "aspmx.l.google.com"
|
|
|
|
priority = 1
|
|
|
|
}
|
|
|
|
resource "cloudflare_record" "ahoskingit_com_mx1" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-12-29 07:15:42 +00:00
|
|
|
name = cloudflare_zone.ahoskingit_com.zone
|
2019-06-14 03:15:54 +00:00
|
|
|
type = "MX"
|
|
|
|
value = "alt1.aspmx.l.google.com"
|
|
|
|
priority = 5
|
|
|
|
}
|
|
|
|
resource "cloudflare_record" "ahoskingit_com_mx2" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-12-29 07:15:42 +00:00
|
|
|
name = cloudflare_zone.ahoskingit_com.zone
|
2017-01-31 17:43:56 +00:00
|
|
|
type = "MX"
|
2019-06-14 03:15:54 +00:00
|
|
|
value = "alt2.aspmx.l.google.com"
|
|
|
|
priority = 5
|
|
|
|
}
|
|
|
|
resource "cloudflare_record" "ahoskingit_com_mx3" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-12-29 07:15:42 +00:00
|
|
|
name = cloudflare_zone.ahoskingit_com.zone
|
2019-06-14 03:15:54 +00:00
|
|
|
type = "MX"
|
|
|
|
value = "alt3.aspmx.l.google.com"
|
|
|
|
priority = 10
|
|
|
|
}
|
|
|
|
resource "cloudflare_record" "ahoskingit_com_mx4" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-12-29 07:15:42 +00:00
|
|
|
name = cloudflare_zone.ahoskingit_com.zone
|
2019-06-14 03:15:54 +00:00
|
|
|
type = "MX"
|
|
|
|
value = "alt4.aspmx.l.google.com"
|
|
|
|
priority = 10
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "cloudflare_record" "ahoskingit_com_txt" {
|
2019-12-29 06:57:42 +00:00
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
2019-12-29 07:15:42 +00:00
|
|
|
name = cloudflare_zone.ahoskingit_com.zone
|
2017-01-31 17:43:56 +00:00
|
|
|
type = "TXT"
|
2019-06-14 03:15:54 +00:00
|
|
|
ttl = 120
|
|
|
|
value = "google-site-verification=8-QKnBQElI58gnygDWcCzvDGRh31c_bFmNMaSd0fCwE"
|
2020-07-24 05:46:48 +00:00
|
|
|
}
|
2021-04-04 05:53:45 +00:00
|
|
|
|
|
|
|
resource "cloudflare_record" "ahoskingit_house" {
|
|
|
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
|
|
|
name = "house.ahoskingit.com"
|
|
|
|
type = "CNAME"
|
|
|
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
|
|
|
proxied = "true"
|
|
|
|
}
|