1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-09-28 20:51:20 +02:00

tf-stage1/archlinux: Switch archlinux_org_gitlab_pages to a map

This commit is contained in:
Kristian Klausen 2020-12-27 22:16:32 +01:00 committed by Frederik Schwan
parent 91196b5abe
commit fc13e31a69
No known key found for this signature in database
GPG Key ID: 9D4C5AA15426DA0A
2 changed files with 6 additions and 9 deletions

@ -24,10 +24,7 @@ something hosted below one of our domains is official).
1. [ ] At this point, we'll need to add some stuff to the `archlinux_org_gitlab_pages` variable in `archlinux.tf`. It should look something like this.
Make sure to substitute the `your-domain` and `your-code-shown-by-gitlab` strings accordingly:
{
name = "your-domain"
verification_code = "your-code-shown-by-gitlab"
}
"your-domain" = "your-code-shown-by-gitlab"
1. [ ] Run `terraform apply` and go back to GitLab. Hit `Verify` and it should pick up the new domain
verification code. It should then also automatically begin fetching a certificate via Let's

@ -1,20 +1,20 @@
# This files contains template handling for the main archlinux.tf file
resource "hetznerdns_record" "archlinux_org_gitlab_pages_cname" {
for_each = { for p in local.archlinux_org_gitlab_pages : p.name => p }
for_each = local.archlinux_org_gitlab_pages
zone_id = hetznerdns_zone.archlinux.id
name = each.value.name
name = each.key
value = "pages.archlinux.org."
type = "CNAME"
}
resource "hetznerdns_record" "archlinux_org_gitlab_pages_verification_code_txt" {
for_each = { for p in local.archlinux_org_gitlab_pages : p.name => p }
for_each = local.archlinux_org_gitlab_pages
zone_id = hetznerdns_zone.archlinux.id
name = "_gitlab-pages-verification-code.${each.value.name}"
value = "gitlab-pages-verification-code=${each.value.verification_code}"
name = "_gitlab-pages-verification-code.${each.value}"
value = "gitlab-pages-verification-code=${each.value}"
type = "TXT"
}