From 45805763e73bc76827381184c9463228b7873bb1 Mon Sep 17 00:00:00 2001
From: Frederik Schwan <frederik.schwan@linux.com>
Date: Mon, 28 Dec 2020 02:14:12 +0100
Subject: [PATCH] fixups to minimize terraform state changes while applying
 !238

---
 tf-stage1/archlinux.tf | 10 ++++++----
 tf-stage1/templates.tf |  4 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/tf-stage1/archlinux.tf b/tf-stage1/archlinux.tf
index a1a9aeead..2ed403365 100644
--- a/tf-stage1/archlinux.tf
+++ b/tf-stage1/archlinux.tf
@@ -44,11 +44,11 @@ locals {
     "archlinux.org" = {
       server_type = "cpx11"
       domain      = "@"
+      ttl         = 600
     }
     "accounts.archlinux.org" = {
       server_type = "cx11"
       domain      = "accounts"
-      ttl         = 600
     }
     "aur-dev.archlinux.org" = {
       server_type = "cx11"
@@ -82,7 +82,6 @@ locals {
     "mailman3.archlinux.org" = {
       server_type = "cx11"
       domain      = "mailman3"
-      ttl         = 600
     }
     "matrix.archlinux.org" = {
       server_type = "cpx31"
@@ -99,6 +98,7 @@ locals {
     "patchwork.archlinux.org" = {
       server_type = "cx11"
       domain      = "patchwork"
+      ttl         = 600
     }
     "phrik.archlinux.org" = {
       server_type = "cx11"
@@ -119,14 +119,16 @@ locals {
     "security.archlinux.org" = {
       server_type = "cx11"
       domain      = "security"
+      ttl         = 600
     }
     "svn2gittest.archlinux.org" = {
       server_type = "cx11"
       domain      = "svn2gittest"
     }
     "wiki.archlinux.org" = {
-      server_type = "cx11"
+      server_type = "cpx11"
       domain      = "wiki"
+      ttl         = 600
     }
     "mirror.pkgbuild.com" = {
       server_type = "cx11"
@@ -236,7 +238,7 @@ locals {
     repos                    = { value = "gemini" }
     rsync                    = { value = "gemini" }
     sources                  = { value = "gemini" }
-    "static.conf"            = { value = "apollo" }
+    "static.conf"            = { value = "redirect" }
     static                   = { value = "apollo" }
     status                   = { value = "stats.uptimerobot.com." }
     svn                      = { value = "gemini" }
diff --git a/tf-stage1/templates.tf b/tf-stage1/templates.tf
index b4974678f..3e1d82bb6 100644
--- a/tf-stage1/templates.tf
+++ b/tf-stage1/templates.tf
@@ -13,7 +13,7 @@ resource "hetznerdns_record" "archlinux_org_gitlab_pages_verification_code_txt"
   for_each = local.archlinux_org_gitlab_pages
 
   zone_id = hetznerdns_zone.archlinux.id
-  name    = "_gitlab-pages-verification-code.${each.value}"
+  name    = "_gitlab-pages-verification-code.${each.key}"
   value   = "gitlab-pages-verification-code=${each.value}"
   type    = "TXT"
 }
@@ -87,7 +87,7 @@ resource "hcloud_rdns" "rdns_ipv6" {
 resource "hcloud_server" "machine" {
   for_each = local.machines
 
-  name        = each.value.domain
+  name        = each.key
   image       = data.hcloud_image.archlinux.id
   server_type = each.value.server_type
   lifecycle {
-- 
GitLab