From 6179303f9f34570215c6eec058b0af3090c6bee3 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Tue, 23 Aug 2022 17:50:21 +0200 Subject: [PATCH] add sloth domains --- namecheap.tf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/namecheap.tf b/namecheap.tf index 7764b65..ace945b 100644 --- a/namecheap.tf +++ b/namecheap.tf @@ -70,6 +70,20 @@ variable "narwhal-hostnames" { ] } +// These are subdomains for services hosted on the host named `sloth`. +// They are only accessible from my internal network and my internal DNS server +// takes care of that. +// But I set the public A record to caladan's ipv4 just for renewing their +// letsencrypt certificates. No need to set the AAAA record. +variable "sloth-hostnames" { + type = set(string) + default = [ + "kodi", + "mympd", + "snapweb", + ] +} + provider "namecheap" { user_name = "gthar" api_user = "gthar" @@ -99,6 +113,15 @@ resource "namecheap_domain_records" "monotremata-xyz" { } } + dynamic "record" { + for_each = var.sloth-hostnames + content { + hostname = record.value + type = "A" + address = var.caladan-ips.v4 + } + } + dynamic "record" { for_each = var.caladan-hostnames content {