dns files, and cleanup

main
Ben Kristinsson 2 months ago
parent 990884c684
commit 9082d03213
  1. 576
      cloudflare.tf
  2. 49
      dns-deadops-de.tf
  3. 0
      dns-fjall-org.tf
  4. 31
      dns-htznr-sudo-is.tf
  5. 0
      dns-lokun-is.tf
  6. 31
      dns-oci-sudo-is.tf
  7. 118
      dns-s21-sudo-is.tf
  8. 0
      dns-saxebol.de.tf
  9. 314
      dns-sudo-is.tf
  10. 0
      dns-sudo-net-eu-org.tf
  11. 8
      dns-vpn-sudo-is.tf
  12. 134
      hetznercloud.tf
  13. 14
      oracle-kubeworker.tf
  14. 7
      oracle-matrix-bridges.tf
  15. 7
      oracle-mon.tf
  16. 8
      sudo-is.tf
  17. 6
      sudo-local.tf

@ -23,582 +23,6 @@ resource "cloudflare_zone_settings_override" "settings" {
}
}
resource "cloudflare_record" "deadopsde" {
zone_id = cloudflare_zone.deadopsde.id
name = ""
value = local.freespace_ip
type = "A"
ttl = 1
proxied = true
}
resource "cloudflare_record" "wwwdeadops" {
zone_id = cloudflare_zone.deadopsde.id
name = "www"
value = "deadops.de"
type = "CNAME"
ttl = 1
proxied = true
}
resource "cloudflare_record" "ytdldeadops" {
zone_id = cloudflare_zone.deadopsde.id
name = "ytdl"
value = local.fsn_g0_ip
type = "A"
ttl = 1
proxied = true
}
resource "cloudflare_record" "mx" {
zone_id = cloudflare_zone.sudois.id
type = "MX"
name = "@"
priority = "10"
value = "in${count.index + 1}-smtp.messagingengine.com"
ttl = 60
count = 2
}
resource "cloudflare_record" "dkim" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "fm${count.index + 1 }._domainkey"
value = "fm${count.index + 1 }.sudo.is.dkim.fmhosted.com"
ttl = 43200
count = 3
}
resource "cloudflare_record" "sudo-is-txt" {
zone_id = cloudflare_zone.sudois.id
type = "TXT"
name = "@"
value = "v=spf1 mx a ptr include:_spf.investici.org include:spf.messagingengine.com include:_spf.google.com ?all"
ttl = 60
}
resource "cloudflare_record" "sudo-is-txt-google" {
zone_id = cloudflare_zone.sudois.id
type = "TXT"
name = "@"
value = "google-site-verification=_wc8G-J9eElqihJ9G1MHhVYLfR154Rw1WeHPbOhzNrg"
ttl = 60
}
resource "cloudflare_record" "deadops-de-txt-google" {
zone_id = cloudflare_zone.deadopsde.id
type = "TXT"
name = "@"
value = "google-site-verification=fLHZ9CIIWgZ_eiisNRSAoFPULgafWhu7X2GYQ64zMeA"
ttl = 60
}
# hosts
resource "cloudflare_record" "fra0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra0"
value = digitalocean_droplet.fra0.ipv4_address
ttl = 60
}
resource "cloudflare_record" "fra0-do" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra0.do"
value = digitalocean_droplet.fra0.ipv4_address
ttl = 60
}
resource "cloudflare_record" "ams0-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "ams0"
value = local.ams0_ip
ttl = 60
}
resource "cloudflare_record" "ams0-scaleway-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "ams0.scaleway"
value = local.ams0_ip
ttl = 60
}
resource "cloudflare_record" "freespace-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "freespace"
value = local.freespace_ip
ttl = 60
}
resource "cloudflare_record" "freespace-h-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "freespace.h"
value = local.freespace_ip
ttl = 60
}
resource "cloudflare_record" "mainframe-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "mainframe"
value = local.mainframe_ip
ttl = 60
}
resource "cloudflare_record" "mainframe-h-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "mainframe.h"
value = local.mainframe_ip
ttl = 60
}
resource "cloudflare_record" "fra4-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra4"
value = local.mainframe_ip_2
ttl = 60
}
resource "cloudflare_record" "fra4-h-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra4.h"
value = local.mainframe_ip_2
ttl = 60
}
resource "cloudflare_record" "fra5-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra5"
value = local.freespace_ip
ttl = 60
}
resource "cloudflare_record" "fra5-h-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra5.h"
value = local.freespace_ip
ttl = 60
}
resource "cloudflare_record" "fra2-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra2"
value = local.fra2_ip
ttl = 60
}
resource "cloudflare_record" "fsn-g0-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-g0"
value = local.fsn_g0_ip
ttl = 60
}
resource "cloudflare_record" "fsn-g0-h-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-g0.h"
value = local.fsn_g0_ip
ttl = 60
}
# resource "cloudflare_record" "fra2-sudo-is6" {
# zone_id = cloudflare_zone.sudois.id
# type = "AAAA"
# name = "fra2"
# value = local.fra2_ip6
# ttl = 60
# }
resource "cloudflare_record" "s21-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "s21"
value = local.s21_vodafone_ip
ttl = 60
}
resource "cloudflare_record" "bear-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "bear"
value = local.s21_vodafone_ip
ttl = 60
}
resource "cloudflare_record" "bear-s21-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "bear.s21"
value = "192.168.21.10"
ttl = 60
}
resource "cloudflare_record" "ber-jenkins-g0-s21-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "ber-jenkins-g0.s21"
value = "192.168.21.104"
ttl = 60
}
resource "cloudflare_record" "benvm-s21-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "benvm.s21"
value = "192.168.21.140"
ttl = 60
}
resource "cloudflare_record" "endor" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "endor"
value = local.endor_ip
ttl = 60
}
resource "cloudflare_record" "rvk1-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "rvk1"
value = "185.112.146.244"
ttl = 60
}
resource "cloudflare_record" "dl-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "dl"
value = "rvk1.vpn.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "ber0-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "ber0"
value = "192.168.21.4"
ttl = 60
}
resource "cloudflare_record" "broker-vpn-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "broker.vpn"
value = "ber0.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "edge-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "edge.s21"
value = "10.102.47.138"
proxied = false
ttl = 60
}
resource "cloudflare_record" "ber0-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "ber0.s21"
value = "192.168.21.4"
proxied = false
ttl = 60
}
resource "cloudflare_record" "broker-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "broker.s21"
value = "ber0.s21.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "unifi-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "unifi"
value = "bear.s21.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "unifi-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "unifi.s21"
value = "bear.s21.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "unifi-ls54-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "unifi.ls54"
value = "ber1.sudo.is"
#value = "ber0.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "sensor-bedroom-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "sensor-bedroom.s21"
value = "192.168.21.200"
proxied = false
ttl = 60
}
resource "cloudflare_record" "sensor-livingroom-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "sensor-livingroom.s21"
value = "192.168.21.201"
proxied = false
ttl = 60
}
resource "cloudflare_record" "eink-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "eink.s21"
value = "192.168.21.202"
proxied = false
ttl = 60
}
resource "cloudflare_record" "sensor-bathroom-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "sensor-bathroom.s21"
value = "192.168.21.203"
proxied = false
ttl = 60
}
resource "cloudflare_record" "sensor-study-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "sensor-study.s21"
value = "192.168.21.204"
proxied = false
ttl = 60
}
resource "cloudflare_record" "sensor-testbed-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "sensor-testbed.s21"
value = "192.168.21.205"
proxied = false
ttl = 60
}
resource "cloudflare_record" "broker-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "broker"
value = "ber0.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "tools-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "tools"
value = local.mainframe_ip_2
proxied = false
ttl = 60
}
resource "cloudflare_record" "builds-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "builds"
value = local.fsn_g0_ip
proxied = false
ttl = 60
}
resource "cloudflare_record" "pihole-deadops-de" {
zone_id = cloudflare_zone.deadopsde.id
type = "CNAME"
value = "ams0.vpn.sudo.is"
name = "pihole"
ttl = 60
proxied = false
}
# services
resource "cloudflare_record" "vpn-de" {
zone_id = cloudflare_zone.sudois.id
type = "A"
value = local.mainframe_ip
name = "vpn-de"
ttl = 60
proxied = false
}
# resource "cloudflare_record" "static" {
# zone_id = cloudflare_zone.sudois.id
# name = element(["static", "benedikt"], count.index)
# count = 2
# type = "A"
# value = local.fsn_lb_ip
# ttl = 1
# proxied = true
# }
resource "cloudflare_record" "sudois" {
zone_id = cloudflare_zone.sudois.id
name = ""
value = local.fsn_lb_ip
type = "A"
ttl = 1
proxied = false
}
resource "cloudflare_record" "www" {
zone_id = cloudflare_zone.sudois.id
name = "www"
value = "sudo.is"
type = "CNAME"
ttl = 1
proxied = false
}
resource "cloudflare_record" "benedikt-sudo-is" {
zone_id = cloudflare_zone.sudois.id
name = "benedikt"
type = "A"
value = local.fsn_lb_ip
ttl = 1
proxied = true
}
resource "cloudflare_record" "static-sudo-is" {
zone_id = cloudflare_zone.sudois.id
name = "static"
type = "A"
value = local.fsn_lb_ip
ttl = 1
proxied = true
}
resource "cloudflare_record" "mirrors" {
zone_id = cloudflare_zone.deadopsde.id
name = "mirrors"
type = "A"
#value = hcloud_floating_ip.fsn-lb.ip_address
value = local.fsn_lb_ip
ttl = 1
proxied = true
}
resource "cloudflare_record" "parler-archive" {
zone_id = cloudflare_zone.deadopsde.id
name = "parler-archive"
type = "CNAME"
value = "freespace.sudo.is"
ttl = 1
proxied = true
}
# resource "cloudflare_record" "nkscans" {
# zone_id = cloudflare_zone.sudois.id
# name = "nk-scans"
# type = "A"
# value = oci_core_instance.lon3.public_ip
# ttl = 1
# proxied = true
# }
# eyjabakki.sudo.is
# legacy record :(
resource "cloudflare_record" "eyjabakki" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "eyjabakki"
value = "89.160.147.41"
ttl = 60
}
# # mathom.sudo.is
# resource "cloudflare_record" "mathom-sudo-is" {
# zone_id = cloudflare_zone.sudois.id
# type = "A"
# name = "mathom"
# value = "89.17.135.222"
# ttl = 60
# }
# mathom.sudo.is
# kalli
# resource "cloudflare_record" "mathom" {
# zone_id = cloudflare_zone.sudois.id
# type = "A"
# name = "mathom"
# value = "89.17.144.78"
# ttl = 60
# }
resource "cloudflare_record" "mathom" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "mathom"
value = "192.168.21.42"
ttl = 60
}
# VPN
resource "cloudflare_record" "vpn" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "vpn"
value = "vpn-de.sudo.is"
ttl = 60
}
resource "cloudflare_record" "vpn-uk" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "vpn-uk"
value = "lon1.sudo.is"
ttl = 60
}
resource "cloudflare_record" "vpn-is" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "vpn-is"
value = "rvk1.sudo.is"
ttl = 60
}
resource "cloudflare_record" "vpn-mamma" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "vpn-mamma"
value = "rvk1.sudo.is"
ttl = 60
}
resource "cloudflare_record" "wifi001-vpn" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "wifi001-vpn"
value = "lon1.sudo.is"
ttl = 60
}
resource "cloudflare_record" "mammassh" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "mammassh"
value = "rvk1.sudo.is"
ttl = 60
}
resource "cloudflare_record" "rvk0-vpn" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "rvk0-vpn"
value = "lon1.sudo.is"
ttl = 60
}
# resource "cloudflare_record" "grafana" {
# zone_id = cloudflare_zone.sudois.id
# type = "A"
# name = "grafana"
# value = digitalocean_droplet.fra0.ipv4_address
# ttl = 1
# proxied = false
# }
# resource "cloudflare_record" "nextcloud-sudo-is" {
# zone_id = cloudflare_zone.sudois.id
# type = "A"
# name = "nextcloud"
# value = local.mainframe_ip_2
# ttl = 1
# proxied = false
# }
resource "cloudflare_record" "weblate" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "weblate"
value = hcloud_server.fra3-weblate-g0.ipv4_address
ttl = 60
}
# resource "cloudflare_filter" "nextcloud_strict_countries" {
# zone_id = cloudflare_zone.sudois.id

@ -0,0 +1,49 @@
resource "cloudflare_record" "deadopsde" {
zone_id = cloudflare_zone.deadopsde.id
name = ""
value = local.fsn_lb_ip
type = "A"
ttl = 1
proxied = true
}
resource "cloudflare_record" "wwwdeadops" {
zone_id = cloudflare_zone.deadopsde.id
name = "www"
value = "deadops.de"
type = "CNAME"
ttl = 1
proxied = true
}
resource "cloudflare_record" "ytdldeadops" {
zone_id = cloudflare_zone.deadopsde.id
name = "ytdl"
value = local.fsn_g0_ip
type = "A"
ttl = 1
proxied = true
}
resource "cloudflare_record" "deadops-de-txt-google" {
zone_id = cloudflare_zone.deadopsde.id
type = "TXT"
name = "@"
value = "google-site-verification=fLHZ9CIIWgZ_eiisNRSAoFPULgafWhu7X2GYQ64zMeA"
ttl = 60
}
resource "cloudflare_record" "mirrors" {
zone_id = cloudflare_zone.deadopsde.id
name = "mirrors"
type = "A"
#value = hcloud_floating_ip.fsn-lb.ip_address
value = local.fsn_lb_ip
ttl = 1
proxied = true
}
resource "cloudflare_record" "parler-archive" {
zone_id = cloudflare_zone.deadopsde.id
name = "parler-archive"
type = "CNAME"
value = "freespace.sudo.is"
ttl = 1
proxied = true
}

@ -0,0 +1,31 @@
# currently just flat dotted dns records .hcloud.sudo.is
# will be a delegated zone .htznr.sudo.is
resource "cloudflare_record" "fra1-auth-g0-hcloud" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra1-auth-g0.hcloud"
value = "10.101.0.11"
ttl = 60
}
resource "cloudflare_record" "fra3-weblate-g0-hcloud" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra3-weblate-g0.hcloud"
value = "10.101.0.3"
ttl = 60
}
resource "cloudflare_record" "fsn-lb-g0-hcloud" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-lb-g0.hcloud"
value = "10.101.0.4"
ttl = 60
}
resource "cloudflare_record" "fsn-lb-g1-hcloud" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-lb-g1.hcloud"
value = "10.101.0.5"
ttl = 60
}

@ -0,0 +1,31 @@
# these are currently flat dotted dns records .lon.sudo.is
# but will become a delegated zone .oci.sudo.is
resource "cloudflare_record" "lon-matrix-bridges-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "lon-matrix-bridges-g0.lon"
value = oci_core_instance.lon-matrix-bridges-g0.public_ip
ttl = 60
}
resource "cloudflare_record" "lon-kubeworker-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "lon-kubeworker-g0.lon"
value = oci_core_instance.lon-kubeworker-g0.private_ip
ttl = 60
}
resource "cloudflare_record" "lon-mon-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "lon-mon-g0.lon"
value = oci_core_instance.lon-mon-g0.public_ip
ttl = 60
}
# resource "cloudflare_record" "lon-kubeworker-g1" {
# zone_id = cloudflare_zone.sudois.id
# type = "A"
# name = "lon-kubeworker-g1.lon"
# value = oci_core_instance.lon-kubeworker-g1.private_ip
# ttl = 60
# }

@ -0,0 +1,118 @@
## hosts
# currently this is flat dns with dots
# will become a delegated zone
resource "cloudflare_record" "s21-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "s21"
value = local.s21_vodafone_ip
ttl = 60
}
resource "cloudflare_record" "bear-s21-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "bear.s21"
value = "192.168.21.10"
ttl = 60
}
resource "cloudflare_record" "ber-jenkins-g0-s21-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "ber-jenkins-g0.s21"
value = "192.168.21.104"
ttl = 60
}
resource "cloudflare_record" "benvm-s21-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "benvm.s21"
value = "192.168.21.140"
ttl = 60
}
resource "cloudflare_record" "edge-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "edge.s21"
value = "10.102.47.138"
proxied = false
ttl = 60
}
resource "cloudflare_record" "ber0-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "ber0.s21"
value = "192.168.21.4"
proxied = false
ttl = 60
}
## sensor hosts
resource "cloudflare_record" "sensor-bedroom-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "sensor-bedroom.s21"
value = "192.168.21.200"
proxied = false
ttl = 60
}
resource "cloudflare_record" "sensor-livingroom-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "sensor-livingroom.s21"
value = "192.168.21.201"
proxied = false
ttl = 60
}
resource "cloudflare_record" "eink-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "eink.s21"
value = "192.168.21.202"
proxied = false
ttl = 60
}
resource "cloudflare_record" "sensor-bathroom-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "sensor-bathroom.s21"
value = "192.168.21.203"
proxied = false
ttl = 60
}
resource "cloudflare_record" "sensor-study-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "sensor-study.s21"
value = "192.168.21.204"
proxied = false
ttl = 60
}
resource "cloudflare_record" "sensor-testbed-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "sensor-testbed.s21"
value = "192.168.21.205"
proxied = false
ttl = 60
}
## services
resource "cloudflare_record" "broker-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "broker.s21"
value = "ber0.s21.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "unifi-s21-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "unifi.s21"
value = "bear.s21.sudo.is"
proxied = false
ttl = 60
}

@ -0,0 +1,314 @@
## apex
resource "cloudflare_record" "sudois" {
zone_id = cloudflare_zone.sudois.id
name = ""
value = local.fsn_lb_ip
type = "A"
ttl = 1
proxied = false
}
resource "cloudflare_record" "www" {
zone_id = cloudflare_zone.sudois.id
name = "www"
value = "sudo.is"
type = "CNAME"
ttl = 1
proxied = false
}
## email
resource "cloudflare_record" "mx" {
zone_id = cloudflare_zone.sudois.id
type = "MX"
name = "@"
priority = "10"
value = "in${count.index + 1}-smtp.messagingengine.com"
ttl = 60
count = 2
}
resource "cloudflare_record" "dkim" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "fm${count.index + 1 }._domainkey"
value = "fm${count.index + 1 }.sudo.is.dkim.fmhosted.com"
ttl = 43200
count = 3
}
resource "cloudflare_record" "sudo-is-txt" {
zone_id = cloudflare_zone.sudois.id
type = "TXT"
name = "@"
value = "v=spf1 mx a ptr include:_spf.investici.org include:spf.messagingengine.com include:_spf.google.com ?all"
ttl = 60
}
resource "cloudflare_record" "sudo-is-txt-google" {
zone_id = cloudflare_zone.sudois.id
type = "TXT"
name = "@"
value = "google-site-verification=_wc8G-J9eElqihJ9G1MHhVYLfR154Rw1WeHPbOhzNrg"
ttl = 60
}
resource "cloudflare_record" "fra0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra0"
value = digitalocean_droplet.fra0.ipv4_address
ttl = 60
}
resource "cloudflare_record" "ams0-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "ams0"
value = local.ams0_ip
ttl = 60
}
resource "cloudflare_record" "freespace-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "freespace"
value = local.freespace_ip
ttl = 60
}
resource "cloudflare_record" "mainframe-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "mainframe"
value = local.mainframe_ip
ttl = 60
}
resource "cloudflare_record" "fra2-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra2"
value = local.fra2_ip
ttl = 60
}
# resource "cloudflare_record" "fra2-sudo-is6" {
# zone_id = cloudflare_zone.sudois.id
# type = "AAAA"
# name = "fra2"
# value = local.fra2_ip6
# ttl = 60
# }
resource "cloudflare_record" "fsn-g0-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-g0"
value = local.fsn_g0_ip
ttl = 60
}
resource "cloudflare_record" "rvk1-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "rvk1"
value = "185.112.146.244"
ttl = 60
}
resource "cloudflare_record" "ber0-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "ber0"
value = "192.168.21.4"
ttl = 60
}
resource "cloudflare_record" "fra1-auth-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra1-auth-g0"
value = hcloud_server.fra1-auth-g0.ipv4_address
ttl = 60
}
# resource "cloudflare_record" "fra1-auth-g1" {
# zone_id = cloudflare_zone.sudois.id
# type = "A"
# name = "fra1-auth-g1"
# value = hcloud_server.fra1-auth-g1.ipv4_address
# ttl = 60
# }
resource "cloudflare_record" "fra3-weblate-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra3-weblate-g0"
value = hcloud_server.fra3-weblate-g0.ipv4_address
ttl = 60
}
resource "cloudflare_record" "fsn-lb-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-lb-g0"
value = hcloud_server.fsn-lb-g0.ipv4_address
ttl = 60
}
resource "cloudflare_record" "fsn-lb-g1" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-lb-g1"
value = hcloud_server.fsn-lb-g1.ipv4_address
ttl = 60
}
## Load Balancers
resource "cloudflare_record" "fsn-lb" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-lb"
value = hcloud_floating_ip.fsn-lb.ip_address
ttl = 60
}
## services
# most of the service records are created from
# infra/group_vars/fsnlb.yml
# and point to fsn-lb.sudo.is
resource "cloudflare_record" "unifi-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "unifi"
value = "bear.s21.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "broker-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "broker"
value = "ber0.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "tools-sudo-is" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "tools"
value = local.mainframe_ip_2
proxied = false
ttl = 60
}
resource "cloudflare_record" "weblate" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "weblate"
value = hcloud_server.fra3-weblate-g0.ipv4_address
ttl = 60
}
## static, proxied with cloudflare
resource "cloudflare_record" "static" {
zone_id = cloudflare_zone.sudois.id
name = element(["static", "benedikt"], count.index)
count = 2
type = "A"
value = local.fsn_lb_ip
ttl = 1
proxied = true
}
## vpn
resource "cloudflare_record" "vpn" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "vpn"
value = "vpn-de.sudo.is"
ttl = 60
}
resource "cloudflare_record" "vpn-de" {
zone_id = cloudflare_zone.sudois.id
type = "A"
value = local.mainframe_ip
name = "vpn-de"
ttl = 60
proxied = false
}
resource "cloudflare_record" "vpn-uk" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "vpn-uk"
value = "lon1.sudo.is"
ttl = 60
}
resource "cloudflare_record" "vpn-is" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "vpn-is"
value = "rvk1.sudo.is"
ttl = 60
}
resource "cloudflare_record" "vpn-mamma" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "vpn-mamma"
value = "rvk1.sudo.is"
ttl = 60
}
resource "cloudflare_record" "wifi001-vpn" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "wifi001-vpn"
value = "lon1.sudo.is"
ttl = 60
}
resource "cloudflare_record" "mammassh" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "mammassh"
value = "rvk1.sudo.is"
ttl = 60
}
## legacy records
resource "cloudflare_record" "endor" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "endor"
value = local.endor_ip
ttl = 60
}
# eyjabakki.sudo.is
# legacy record :(
resource "cloudflare_record" "eyjabakki" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "eyjabakki"
value = "89.160.147.41"
ttl = 60
}
# # mathom.sudo.is
# resource "cloudflare_record" "mathom-sudo-is" {
# zone_id = cloudflare_zone.sudois.id
# type = "A"
# name = "mathom"
# value = "89.17.135.222"
# ttl = 60
# }
## questionable
resource "cloudflare_record" "unifi-ls54-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "unifi.ls54"
value = "ber1.sudo.is"
#value = "ber0.sudo.is"
proxied = false
ttl = 60
}
resource "cloudflare_record" "mathom" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "mathom"
value = "192.168.21.42"
ttl = 60
}
# resource "cloudflare_record" "rvk0-vpn" {
# zone_id = cloudflare_zone.sudois.id
# type = "CNAME"
# name = "rvk0-vpn"
# value = "lon1.sudo.is"
# ttl = 60
# }

@ -0,0 +1,8 @@
resource "cloudflare_record" "broker-vpn-sudois" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "broker.vpn"
value = "ber0.sudo.is"
proxied = false
ttl = 60
}

@ -90,50 +90,6 @@ resource "hcloud_firewall" "fw-open" {
}
}
## MONITORING
# resource "hcloud_server" "fra0-monitoring-g0" {
# name = "fra0-monitoring-g0"
# image = "ubuntu-20.04"
# server_type = "cx11"
# ssh_keys = [hcloud_ssh_key.default.id]
# location = "fsn1"
# firewall_ids = [hcloud_firewall.fw0.id]
# network {
# network_id = hcloud_network.net0.id
# ip = "10.101.0.10"
# }
# depends_on = [
# hcloud_network_subnet.subnet0
# ]
# }
# resource "hcloud_rdns" "fra0-monitoring-g0" {
# server_id = hcloud_server.fra0-monitoring-g0.id
# ip_address = hcloud_server.fra0-monitoring-g0.ipv4_address
# dns_ptr = "fra0-monitoring-g0.sudo.is"
# }
# resource "cloudflare_record" "fra0-monitoring-g0" {
# zone_id = cloudflare_zone.sudois.id
# type = "A"
# name = "fra0-monitoring-g0"
# value = hcloud_server.fra0-monitoring-g0.ipv4_address
# ttl = 60
# }
#resource "cloudflare_record" "fra0" {
# zone_id = cloudflare_zone.sudois.id
# type = "CNAME"
# name = "fra0"
# value = "fra0-monitoring-g0.sudo.is"
# ttl = 60
#}
# AUTH
resource "hcloud_server" "fra1-auth-g0" {
@ -162,29 +118,6 @@ resource "hcloud_rdns" "fra1-auth-g0" {
dns_ptr = "fra1-auth-g0.sudo.is"
}
resource "cloudflare_record" "fra1-auth-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra1-auth-g0"
value = hcloud_server.fra1-auth-g0.ipv4_address
ttl = 60
}
resource "cloudflare_record" "fra1-auth-g0-hcloud" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra1-auth-g0.hcloud"
value = "10.101.0.11"
ttl = 60
}
resource "cloudflare_record" "fra1" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "fra1"
value = "fra1-auth-g0.sudo.is"
ttl = 60
}
# resource "hcloud_server" "fra1-auth-g1" {
# name = "fra1-auth-g1"
@ -212,13 +145,6 @@ resource "cloudflare_record" "fra1" {
# dns_ptr = "fra1-auth-g1.sudo.is"
# }
# resource "cloudflare_record" "fra1-auth-g1" {
# zone_id = cloudflare_zone.sudois.id
# type = "A"
# name = "fra1-auth-g1"
# value = hcloud_server.fra1-auth-g1.ipv4_address
# ttl = 60
# }
## WEBLATE
@ -250,29 +176,6 @@ resource "hcloud_rdns" "fra3-weblate-g0" {
dns_ptr = "fra3-weblate-g0.sudo.is"
}
resource "cloudflare_record" "fra3-weblate-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra3-weblate-g0"
value = hcloud_server.fra3-weblate-g0.ipv4_address
ttl = 60
}
resource "cloudflare_record" "fra3-weblate-g0-hcloud" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fra3-weblate-g0.hcloud"
value = "10.101.0.3"
ttl = 60
}
resource "cloudflare_record" "fra3" {
zone_id = cloudflare_zone.sudois.id
type = "CNAME"
name = "fra3"
value = "fra3-weblate-g0.sudo.is"
ttl = 60
}
# # LB
@ -308,21 +211,6 @@ resource "hcloud_rdns" "fsn-lb-g0" {
dns_ptr = "fsn-lb-g0.sudo.is"
}
resource "cloudflare_record" "fsn-lb-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-lb-g0"
value = hcloud_server.fsn-lb-g0.ipv4_address
ttl = 60
}
resource "cloudflare_record" "fsn-lb-g0-hcloud" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-lb-g0.hcloud"
value = "10.101.0.4"
ttl = 60
}
resource "hcloud_server" "fsn-lb-g1" {
name = "fsn-lb-g1"
@ -354,20 +242,6 @@ resource "hcloud_rdns" "fsn-lb-g1" {
dns_ptr = "fsn-lb-g1.sudo.is"
}
resource "cloudflare_record" "fsn-lb-g1" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-lb-g1"
value = hcloud_server.fsn-lb-g1.ipv4_address
ttl = 60
}
resource "cloudflare_record" "fsn-lb-g1-hcloud" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-lb-g1.hcloud"
value = "10.101.0.5"
ttl = 60
}
resource "hcloud_floating_ip" "fsn-lb" {
type = "ipv4"
@ -386,14 +260,6 @@ resource "hcloud_rdns" "floating_master" {
ip_address = hcloud_floating_ip.fsn-lb.ip_address
dns_ptr = "fsn-lb.sudo.is"
}
resource "cloudflare_record" "fsn-lb" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "fsn-lb"
value = hcloud_floating_ip.fsn-lb.ip_address
ttl = 60
}
output "fsn-lb_ip" {
value = hcloud_floating_ip.fsn-lb.ip_address
}

@ -41,13 +41,6 @@ resource "oci_core_instance" "lon-kubeworker-g0" {
ocpus = "1"
}
}
resource "cloudflare_record" "lon-kubeworker-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "lon-kubeworker-g0.lon"
value = oci_core_instance.lon-kubeworker-g0.private_ip
ttl = 60
}
# resource "oci_core_instance" "lon-kubeworker-g1" {
@ -93,10 +86,3 @@ resource "cloudflare_record" "lon-kubeworker-g0" {
# ocpus = "1"
# }
# }
# resource "cloudflare_record" "lon-kubeworker-g1" {
# zone_id = cloudflare_zone.sudois.id
# type = "A"
# name = "lon-kubeworker-g1.lon"
# value = oci_core_instance.lon-kubeworker-g1.private_ip
# ttl = 60
# }

@ -60,13 +60,6 @@ resource "oci_core_private_ip" "lon-matrix-bridges-g0" {
vnic_id = oci_core_vnic_attachment.lon-matrix-bridges-g0_vnic.vnic_id
}
resource "cloudflare_record" "lon-matrix-bridges-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "lon-matrix-bridges-g0.lon"
value = oci_core_instance.lon-matrix-bridges-g0.public_ip
ttl = 60
}
# data "oci_core_private_ip" "imported_lon-matrix-bridges-g0" {
# private_ip_id = "ocid1.privateip.oc1.uk-london-1.abwgiljsswdgcav62ktbc4lgu3dctjd5y7534hkusyhl67el57pce3p3arpq"
# }

@ -60,13 +60,6 @@ resource "oci_core_instance" "lon-mon-g0" {
# vnic_id = oci_core_vnic_attachment.lon-mon-g0_vnic.vnic_id
# }
resource "cloudflare_record" "lon-mon-g0" {
zone_id = cloudflare_zone.sudois.id
type = "A"
name = "lon-mon-g0.lon"
value = oci_core_instance.lon-mon-g0.public_ip
ttl = 60
}
# data "oci_core_private_ip" "imported_lon-mon-g0" {
# private_ip_id = "ocid1.privateip.oc1.uk-london-1.abwgiljsswdgcav62ktbc4lgu3dctjd5y7534hkusyhl67el57pce3p3arpq"
# }

@ -1,8 +0,0 @@
### sudo.is
# resource "digitalocean_record" "carebear0-sudo-is" {
# domain = digitalocean_domain.sudo-is.name
# type = "A"
# name = "carebear0"
# value = "52.31.222.237"
# ttl = 60
# }