Skip to content

Commit

Permalink
add: current DNS record
Browse files Browse the repository at this point in the history
  • Loading branch information
sksat committed Dec 19, 2021
1 parent 380b3f1 commit b15a00e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions terraform/dns.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
locals {
# GitHub Pages IP
# https://docs.github.com/ja/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site
gh_pages_ips = [
"185.199.108.153",
"185.199.109.153",
"185.199.110.153",
"185.199.111.153",
]
}

resource "cloudflare_record" "minecraft" {
zone_id = var.CF_ZONE_ID
name = "Minecraft server"
type = "A"
value = "45.76.188.189"
}

resource "cloudflare_record" "gh_pages" {
zone_id = var.CF_ZONE_ID
name = "GitHub Pages"
type = "A"
proxied = true

for_each = toset(local.gh_pages_ips)
value = each.value
}

0 comments on commit b15a00e

Please sign in to comment.