Verified Commit fc13e31a authored by Kristian Klausen's avatar Kristian Klausen 🎉 Committed by Frederik Schwan
Browse files

tf-stage1/archlinux: Switch archlinux_org_gitlab_pages to a map

parent 91196b5a
......@@ -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
......
# 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"
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment