add sloth domains

main
Ricard Illa 2022-08-23 17:50:21 +02:00
parent 115f391ab8
commit 6179303f9f
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
1 changed files with 23 additions and 0 deletions

View File

@ -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 {