infrastructure/terraform/sys_domains.tf
Jake Howard f88d224168
Some checks failed
/ terraform (push) Failing after 41s
/ ansible (push) Successful in 1m41s
Allow only exposing services over Tailscale
This works using public DNS, so doesn't need Tailscale's magic DNS to override my local.
2024-03-07 22:30:10 +00:00

47 lines
1.2 KiB
HCL

resource "cloudflare_record" "sys_domain_casey" {
zone_id = cloudflare_zone.theorangeonenet.id
name = "casey.sys"
value = linode_instance.casey.ip_address
type = "A"
ttl = 1
}
resource "cloudflare_record" "sys_domain_walker" {
zone_id = cloudflare_zone.theorangeonenet.id
name = "walker.sys"
value = vultr_instance.walker.main_ip
type = "A"
ttl = 1
}
resource "cloudflare_record" "sys_domain_casey_v6" {
zone_id = cloudflare_zone.theorangeonenet.id
name = "casey.sys"
value = split("/", linode_instance.casey.ipv6)[0]
type = "AAAA"
ttl = 1
}
resource "cloudflare_record" "sys_domain_walker_v6" {
zone_id = cloudflare_zone.theorangeonenet.id
name = "walker.sys"
value = vultr_instance.walker.v6_main_ip
type = "AAAA"
ttl = 1
}
resource "cloudflare_record" "sys_domain_pve" {
zone_id = cloudflare_zone.theorangeonenet.id
name = "pve.sys"
value = linode_instance.casey.ip_address
type = "A"
ttl = 1
}
resource "cloudflare_record" "sys_domain_private" {
zone_id = cloudflare_zone.theorangeonenet.id
name = "private.sys"
value = local.private_ipv6_marker
type = "AAAA"
ttl = 1
}