#resource "linode_domain_record" "vpn-conflatorio" {
#  domain_id   = linode_domain.root.id
#  name        = "conflatorio.vpn"
#  record_type = "AAAA"
#  target      = "fdf3:aad9:a885:77dd::2"
#}

resource "linode_domain_record" "net-conflatorio" {
  domain_id   = linode_domain.root.id
  name        = "conflatorio.net"
  record_type = "AAAA"
  target      = "fdb1:4242:3538:2001::ffff"
}

resource "linode_domain_record" "vpn-unifi" {
  domain_id   = linode_domain.root.id
  name        = "unifi.vpn"
  record_type = "CNAME"
  target      = "${linode_domain_record.net-conflatorio.name}.trygvis.io"
}

resource "linode_domain_record" "vpn-influxdb" {
  domain_id   = linode_domain.root.id
  name        = "influxdb.vpn"
  record_type = "CNAME"
  target      = "${linode_domain_record.vpn-conflatorio.name}.trygvis.io"
}

resource "linode_domain_record" "vpn-buildfarm-server" {
  domain_id   = linode_domain.root.id
  name        = "buildfarm-server.vpn"
  record_type = "CNAME"
  target      = "${linode_domain_record.vpn-conflatorio.name}.trygvis.io"
}

resource "linode_domain_record" "vpn-conflatorio-pgadmin" {
  domain_id   = linode_domain.root.id
  name        = "pgadmin.conflatorio"
  record_type = "CNAME"
  target      = "${linode_domain_record.vpn-conflatorio.name}.trygvis.io"
}