Conversion to Terroform 12 and Cloudflare 2
Adds home temperatures
This commit is contained in:
parent
4e3b1e65ba
commit
4835d55c87
@ -3,27 +3,28 @@
|
|||||||
#Setup the domain in route53
|
#Setup the domain in route53
|
||||||
resource "cloudflare_zone" "ahoskingit_com" {
|
resource "cloudflare_zone" "ahoskingit_com" {
|
||||||
zone = "ahoskingit.com"
|
zone = "ahoskingit.com"
|
||||||
|
plan = "free"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "ahoskingit" {
|
resource "cloudflare_record" "ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "ahoskingit.com"
|
name = "ahoskingit.com"
|
||||||
type = "A"
|
type = "A"
|
||||||
ttl = "1"
|
ttl = "1"
|
||||||
value = "${var.site5_ip}"
|
value = var.site5_ip
|
||||||
proxied = "true"
|
proxied = "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "ahoskingit_www" {
|
resource "cloudflare_record" "ahoskingit_www" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "www"
|
name = "www"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
value = "${cloudflare_record.ahoskingit.name}"
|
value = "cloudflare_record.ahoskingit.name"
|
||||||
proxied = "true"
|
proxied = "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "ahoskingit_influx" {
|
resource "cloudflare_record" "ahoskingit_influx" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "influx"
|
name = "influx"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
value = "home.ahoskingit.com"
|
value = "home.ahoskingit.com"
|
||||||
@ -34,12 +35,12 @@ resource "cloudflare_record" "ahoskingit_influx" {
|
|||||||
# domain = "ahoskingit.com"
|
# domain = "ahoskingit.com"
|
||||||
# name = "*"
|
# name = "*"
|
||||||
# type = "A"
|
# type = "A"
|
||||||
# value = "${var.home_ip}"
|
# value = var.home_ip
|
||||||
# proxied = "true" #A records cannot be proxied if wildcard
|
# proxied = "true" #A records cannot be proxied if wildcard
|
||||||
#}
|
#}
|
||||||
|
|
||||||
resource "cloudflare_record" "ahoskingit_plex" {
|
resource "cloudflare_record" "ahoskingit_plex" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "plex.ahoskingit.com"
|
name = "plex.ahoskingit.com"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
value = "home.ahoskingit.com"
|
value = "home.ahoskingit.com"
|
||||||
@ -47,164 +48,173 @@ resource "cloudflare_record" "ahoskingit_plex" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "home_ahoskingit" {
|
resource "cloudflare_record" "home_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "home"
|
name = "home"
|
||||||
type = "A"
|
type = "A"
|
||||||
value = "${var.home_ip}"
|
value = var.home_ip
|
||||||
proxied = "true"
|
proxied = "true"
|
||||||
}
|
}
|
||||||
|
### Home Subdomains ###
|
||||||
|
resource "cloudflare_record" "temps_home_ahoskingit" {
|
||||||
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
|
name = "temperature.home"
|
||||||
|
type = "CNAME"
|
||||||
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
||||||
|
proxied = "true"
|
||||||
|
}
|
||||||
|
### END Home Subdomains ###
|
||||||
|
|
||||||
resource "cloudflare_record" "kfa_ahoskingit" {
|
resource "cloudflare_record" "kfa_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "kfa"
|
name = "kfa"
|
||||||
type = "A"
|
type = "A"
|
||||||
value = "${var.kfa_ip}"
|
value = var.kfa_ip
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "lab_ahoskingit" {
|
resource "cloudflare_record" "lab_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "lab"
|
name = "lab"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
proxied = true
|
proxied = true
|
||||||
value = "${cloudflare_record.kfa_ahoskingit.name}.${cloudflare_zone.ahoskingit_com.zone}"
|
value = cloudflare_record.kfa_ahoskingit.value
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "logs_ahoskingit" {
|
resource "cloudflare_record" "logs_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "logs"
|
name = "logs"
|
||||||
type = "A"
|
type = "A"
|
||||||
proxied = true
|
proxied = true
|
||||||
value = "${var.home_ip}"
|
value = var.home_ip
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "inventory_ahoskingit" {
|
resource "cloudflare_record" "inventory_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "inventory"
|
name = "inventory"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
proxied = true
|
proxied = true
|
||||||
value = "${cloudflare_record.home_ahoskingit.name}.${cloudflare_zone.ahoskingit_com.zone}"
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
||||||
}
|
}
|
||||||
|
|
||||||
# resource "cloudflare_record" "requests_plex_ahoskingit" {
|
# resource "cloudflare_record" "requests_plex_ahoskingit" {
|
||||||
# domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
# zone_id = cloudflare_zone.ahoskingit_com
|
||||||
# name = "requests.plex"
|
# name = "requests.plex"
|
||||||
# type = "CNAME"
|
# type = "CNAME"
|
||||||
# proxied = true
|
# proxied = true
|
||||||
# value = "${cloudflare_record.home_ahoskingit.name}"
|
# value = "cloudflare_record.home_ahoskingit.name"
|
||||||
# }
|
# }
|
||||||
|
|
||||||
resource "cloudflare_record" "ns1_ahoskingit" {
|
resource "cloudflare_record" "ns1_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "ns1"
|
name = "ns1"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
proxied = true
|
proxied = true
|
||||||
value = "${cloudflare_record.home_ahoskingit.name}.${cloudflare_zone.ahoskingit_com.zone}"
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "docs_ahoskingit" {
|
resource "cloudflare_record" "docs_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "docs"
|
name = "docs"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
proxied = true
|
proxied = true
|
||||||
value = "${cloudflare_record.home_ahoskingit.name}.${cloudflare_zone.ahoskingit_com.zone}"
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "cloud_ahoskingit" {
|
resource "cloudflare_record" "cloud_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "cloud"
|
name = "cloud"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
proxied = true
|
proxied = true
|
||||||
value = "${cloudflare_record.home_ahoskingit.name}.${cloudflare_zone.ahoskingit_com.zone}"
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "goals_ahoskingit" {
|
resource "cloudflare_record" "goals_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "goals"
|
name = "goals"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
proxied = true
|
proxied = true
|
||||||
value = "${cloudflare_record.home_ahoskingit.name}.${cloudflare_zone.ahoskingit_com.zone}"
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "office_ahoskingit" {
|
resource "cloudflare_record" "office_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "office"
|
name = "office"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
proxied = true
|
proxied = true
|
||||||
value = "${cloudflare_record.home_ahoskingit.name}.${cloudflare_zone.ahoskingit_com.zone}"
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "support_ahoskingit" {
|
resource "cloudflare_record" "support_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "support"
|
name = "support"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
proxied = true
|
proxied = true
|
||||||
value = "${cloudflare_record.home_ahoskingit.name}.${cloudflare_zone.ahoskingit_com.zone}"
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "git_ahoskingit" {
|
resource "cloudflare_record" "git_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "git"
|
name = "git"
|
||||||
type = "A"
|
type = "A"
|
||||||
value = "${var.home_ip}"
|
value = var.home_ip
|
||||||
#proxied = "true"
|
#proxied = "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "gitlab_ahoskingit" {
|
resource "cloudflare_record" "gitlab_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "gitlab"
|
name = "gitlab"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
proxied = true
|
proxied = true
|
||||||
value = "${cloudflare_record.home_ahoskingit.name}.${cloudflare_zone.ahoskingit_com.zone}"
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "monitors_ahoskingit" {
|
resource "cloudflare_record" "monitors_ahoskingit" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "monitors"
|
name = "monitors"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
value = "${cloudflare_record.home_ahoskingit.name}.${cloudflare_zone.ahoskingit_com.zone}"
|
value = join(".", [cloudflare_record.home_ahoskingit.name, cloudflare_zone.ahoskingit_com.zone])
|
||||||
proxied = true
|
proxied = true
|
||||||
}
|
}
|
||||||
|
|
||||||
# email MX records for DNS
|
# email MX records for DNS
|
||||||
resource "cloudflare_record" "ahoskingit_com_mx" {
|
resource "cloudflare_record" "ahoskingit_com_mx" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "${cloudflare_zone.ahoskingit_com.zone}"
|
name = "cloudflare_zone.ahoskingit_com.zone"
|
||||||
type = "MX"
|
type = "MX"
|
||||||
value = "aspmx.l.google.com"
|
value = "aspmx.l.google.com"
|
||||||
priority = 1
|
priority = 1
|
||||||
}
|
}
|
||||||
resource "cloudflare_record" "ahoskingit_com_mx1" {
|
resource "cloudflare_record" "ahoskingit_com_mx1" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "${cloudflare_zone.ahoskingit_com.zone}"
|
name = cloudflare_zone.ahoskingit_com.id
|
||||||
type = "MX"
|
type = "MX"
|
||||||
value = "alt1.aspmx.l.google.com"
|
value = "alt1.aspmx.l.google.com"
|
||||||
priority = 5
|
priority = 5
|
||||||
}
|
}
|
||||||
resource "cloudflare_record" "ahoskingit_com_mx2" {
|
resource "cloudflare_record" "ahoskingit_com_mx2" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "${cloudflare_zone.ahoskingit_com.zone}"
|
name = cloudflare_zone.ahoskingit_com.id
|
||||||
type = "MX"
|
type = "MX"
|
||||||
value = "alt2.aspmx.l.google.com"
|
value = "alt2.aspmx.l.google.com"
|
||||||
priority = 5
|
priority = 5
|
||||||
}
|
}
|
||||||
resource "cloudflare_record" "ahoskingit_com_mx3" {
|
resource "cloudflare_record" "ahoskingit_com_mx3" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "${cloudflare_zone.ahoskingit_com.zone}"
|
name = cloudflare_zone.ahoskingit_com.id
|
||||||
type = "MX"
|
type = "MX"
|
||||||
value = "alt3.aspmx.l.google.com"
|
value = "alt3.aspmx.l.google.com"
|
||||||
priority = 10
|
priority = 10
|
||||||
}
|
}
|
||||||
resource "cloudflare_record" "ahoskingit_com_mx4" {
|
resource "cloudflare_record" "ahoskingit_com_mx4" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "${cloudflare_zone.ahoskingit_com.zone}"
|
name = cloudflare_zone.ahoskingit_com.id
|
||||||
type = "MX"
|
type = "MX"
|
||||||
value = "alt4.aspmx.l.google.com"
|
value = "alt4.aspmx.l.google.com"
|
||||||
priority = 10
|
priority = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "ahoskingit_com_txt" {
|
resource "cloudflare_record" "ahoskingit_com_txt" {
|
||||||
domain = "${cloudflare_zone.ahoskingit_com.zone}"
|
zone_id = cloudflare_zone.ahoskingit_com.id
|
||||||
name = "${cloudflare_zone.ahoskingit_com.zone}"
|
name = cloudflare_zone.ahoskingit_com.id
|
||||||
type = "TXT"
|
type = "TXT"
|
||||||
ttl = 120
|
ttl = 120
|
||||||
value = "google-site-verification=8-QKnBQElI58gnygDWcCzvDGRh31c_bFmNMaSd0fCwE"
|
value = "google-site-verification=8-QKnBQElI58gnygDWcCzvDGRh31c_bFmNMaSd0fCwE"
|
||||||
|
Loading…
Reference in New Issue
Block a user