From ef7260ce143f1ff856808bb9048b9395fd52934d Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Sun, 10 Oct 2021 05:19:35 +0200
Subject: [PATCH] terraform: Add IPv6 for load balancer DNS

---
 terraform/dns.tf | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/terraform/dns.tf b/terraform/dns.tf
index cc3546bfe..b12e03b15 100644
--- a/terraform/dns.tf
+++ b/terraform/dns.tf
@@ -22,3 +22,28 @@ resource "cloudflare_record" "dns_a_apps_wildcard" {
   type    = "A"
   ttl     = 300
 }
+
+resource "cloudflare_record" "dns_aaaa_api" {
+  zone_id = var.dns_zone_id
+  name    = "api.${var.dns_domain}"
+  value   = hcloud_load_balancer.lb.ipv6
+  type    = "AAAA"
+  ttl     = 300
+}
+
+resource "cloudflare_record" "dns_aaaa_apps" {
+  zone_id = var.dns_zone_id
+  name    = "apps.${var.dns_domain}"
+  value   = hcloud_load_balancer.lb.ipv6
+  type    = "AAAA"
+  ttl     = 300
+}
+
+
+resource "cloudflare_record" "dns_aaaa_apps_wildcard" {
+  zone_id = var.dns_zone_id
+  name    = "*.apps.${var.dns_domain}"
+  value   = hcloud_load_balancer.lb.ipv6
+  type    = "AAAA"
+  ttl     = 300
+}
-- 
GitLab