From 629ea4b6f6764ef7a36352cda8c17b30acf19d15 Mon Sep 17 00:00:00 2001 From: zimbatm <zimbatm@zimbatm.com> Date: Wed, 17 Jun 2020 12:18:06 +0200 Subject: [PATCH] terraform: bind github pages to nix-community.org (#27) This allows to host repos under the domain if we want to. For now, only have nur.nix-community.org --- terraform/cloudflare_nix-community_org.tf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/terraform/cloudflare_nix-community_org.tf b/terraform/cloudflare_nix-community_org.tf index 936640b..a26f3cd 100644 --- a/terraform/cloudflare_nix-community_org.tf +++ b/terraform/cloudflare_nix-community_org.tf @@ -52,3 +52,19 @@ resource "cloudflare_record" "mumble-AAAA" { value = "2a03:3b40:fe:ab::1" type = "AAAA" } + +# For each github page, create a CNAME alias to nix-community.github.io +locals { + github_pages = [ + "nur" + ] +} + +resource "cloudflare_record" "nix-community-org-github-pages" { + for_each = {for page in local.github_pages: page => page} + + zone_id = local.nix_community_org_zone_id + name = each.value + value = "nix-community.github.io" + type = "CNAME" +}