add ahosking.com updates

This commit is contained in:
Alexander Hosking 2021-10-13 10:58:41 -04:00
parent 3300aea9f8
commit 34889b2214

View File

@ -2,83 +2,119 @@
#Setup the domain in route53 #Setup the domain in route53
resource "aws_route53_zone" "ahosking" { resource "aws_route53_zone" "ahosking" {
name = "ahosking.com" name = "ahosking.com"
} }
resource "cloudflare_zone" "ahosking_com" { resource "cloudflare_zone" "ahosking_com" {
zone = "ahosking.com" zone = "ahosking.com"
plan = "free" plan = "free"
} }
resource "cloudflare_record" "ahosking" { resource "cloudflare_record" "ahosking" {
zone_id = cloudflare_zone.ahosking_com.id zone_id = cloudflare_zone.ahosking_com.id
name = "ahosking.com" name = "ahosking.com"
type = "A" type = "A"
ttl = "1" ttl = "1"
value = var.site5_ip value = var.site5_ip
} }
resource "cloudflare_record" "ahosking_wildcard" { resource "cloudflare_record" "ahosking_wildcard" {
zone_id = cloudflare_zone.ahosking_com.id zone_id = cloudflare_zone.ahosking_com.id
name = "*.ahosking.com" name = "*.ahosking.com"
type = "A" type = "A"
ttl = "1" ttl = "1"
value = var.site5_ip value = var.home_ip
} }
resource "cloudflare_record" "ahosking_www" { resource "cloudflare_record" "ahosking_www" {
zone_id = cloudflare_zone.ahosking_com.id zone_id = cloudflare_zone.ahosking_com.id
name = "www.ahosking.com" name = "www.ahosking.com"
type = "CNAME" type = "CNAME"
ttl = "1" ttl = "1"
value = cloudflare_record.ahosking.name value = cloudflare_record.ahosking.name
proxied = "true"
}
resource "cloudflare_record" "ahosking_home" {
zone_id = cloudflare_zone.ahosking_com.id
name = "home"
type = "A"
ttl = "1"
value = var.home_ip
}
resource "cloudflare_record" "ahosking_code" {
zone_id = cloudflare_zone.ahosking_com.id
name = "code"
type = "CNAME"
ttl = "1"
value = cloudflare_record.ahosking_home.name
proxied = "true"
}
resource "cloudflare_record" "ahosking_ombi" {
zone_id = cloudflare_zone.ahosking_com.id
name = "ombi"
type = "CNAME"
ttl = "1"
value = cloudflare_record.ahosking_home.name
proxied = "true"
}
resource "cloudflare_record" "ahosking_radarr" {
zone_id = cloudflare_zone.ahosking_com.id
name = "radarr"
type = "CNAME"
ttl = "1"
value = cloudflare_record.ahosking_home.name
proxied = "true"
} }
# email MX value for DNS # email MX value for DNS
resource "cloudflare_record" "ahosking_mx" { resource "cloudflare_record" "ahosking_mx" {
zone_id = cloudflare_zone.ahosking_com.id zone_id = cloudflare_zone.ahosking_com.id
name = cloudflare_zone.ahosking_com.zone name = cloudflare_zone.ahosking_com.zone
type = "MX" type = "MX"
ttl = "60" ttl = "60"
value = "aspmx.l.google.com" value = "aspmx.l.google.com"
priority = 1 priority = 1
} }
resource "cloudflare_record" "ahosking_mx1" { resource "cloudflare_record" "ahosking_mx1" {
zone_id = cloudflare_zone.ahosking_com.id zone_id = cloudflare_zone.ahosking_com.id
name = cloudflare_zone.ahosking_com.zone name = cloudflare_zone.ahosking_com.zone
type = "MX" type = "MX"
ttl = "60" ttl = "60"
value = "alt1.aspmx.l.google.com" value = "alt1.aspmx.l.google.com"
priority = 5 priority = 5
} }
resource "cloudflare_record" "ahosking_mx2" { resource "cloudflare_record" "ahosking_mx2" {
zone_id = cloudflare_zone.ahosking_com.id zone_id = cloudflare_zone.ahosking_com.id
name = cloudflare_zone.ahosking_com.zone name = cloudflare_zone.ahosking_com.zone
type = "MX" type = "MX"
ttl = "60" ttl = "60"
value = "alt2.aspmx.l.google.com" value = "alt2.aspmx.l.google.com"
priority = 5 priority = 5
} }
resource "cloudflare_record" "ahosking_mx3" { resource "cloudflare_record" "ahosking_mx3" {
zone_id = cloudflare_zone.ahosking_com.id zone_id = cloudflare_zone.ahosking_com.id
name = cloudflare_zone.ahosking_com.zone name = cloudflare_zone.ahosking_com.zone
type = "MX" type = "MX"
ttl = "60" ttl = "60"
value = "alt3.aspmx.l.google.com" value = "alt3.aspmx.l.google.com"
priority = 10 priority = 10
} }
resource "cloudflare_record" "ahosking_mx4" { resource "cloudflare_record" "ahosking_mx4" {
zone_id = cloudflare_zone.ahosking_com.id zone_id = cloudflare_zone.ahosking_com.id
name = cloudflare_zone.ahosking_com.zone name = cloudflare_zone.ahosking_com.zone
type = "MX" type = "MX"
ttl = "60" ttl = "60"
value = "alt4.aspmx.l.google.com" value = "alt4.aspmx.l.google.com"
priority = 10 priority = 10
} }
resource "cloudflare_record" "ahosking_txt" { resource "cloudflare_record" "ahosking_txt" {
zone_id = cloudflare_zone.ahosking_com.id zone_id = cloudflare_zone.ahosking_com.id
name = cloudflare_zone.ahosking_com.zone name = cloudflare_zone.ahosking_com.zone
type = "TXT" type = "TXT"
ttl = 60 ttl = 60
value = "google-site-verification=8-QKnBQElI58gnygDWcCzvDGRh31c_bFmNMaSd0fCwE" value = "google-site-verification=8-QKnBQElI58gnygDWcCzvDGRh31c_bFmNMaSd0fCwE"
} }