Skip to content
Snippets Groups Projects
Verified Commit 5007c1a8 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

tf-stage1: allow setting the NS TTL of geo domains

When adding a new geo domain or doing other testing, we would want to
use a low TTL to allow for making quick changes to the configuration.
parent bb000824
No related branches found
No related tags found
No related merge requests found
Pipeline #18856 passed
......@@ -366,6 +366,11 @@ locals {
}
# Domains served by machines in the geo_mirrors group
# Valid parameters are:
# - zone_id (mandatory, either of hetznerdns_zone.{archlinux,pkgbuild}.id)
# - name (mandatory, specifies the subdomain to create in the above zone)
# - ttl (optional, the TTL of the NS records, defaults to 86400 if unset)
#
geo_domains = {
"geo.mirror.pkgbuild.com" = {
zone_id = hetznerdns_zone.pkgbuild.id
......
......@@ -150,7 +150,7 @@ resource "hetznerdns_record" "geo_ns1" {
name = each.value.name
value = "asia.mirror.pkgbuild.com."
type = "NS"
ttl = 86400
ttl = lookup(local.geo_domains[each.key], "ttl", 86400)
}
resource "hetznerdns_record" "geo_ns2" {
......@@ -160,7 +160,7 @@ resource "hetznerdns_record" "geo_ns2" {
name = each.value.name
value = "america.mirror.pkgbuild.com."
type = "NS"
ttl = 86400
ttl = lookup(local.geo_domains[each.key], "ttl", 86400)
}
resource "hetznerdns_record" "geo_ns3" {
......@@ -170,5 +170,5 @@ resource "hetznerdns_record" "geo_ns3" {
name = each.value.name
value = "europe.mirror.pkgbuild.com."
type = "NS"
ttl = 86400
ttl = lookup(local.geo_domains[each.key], "ttl", 86400)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment