add sloth domains
parent
115f391ab8
commit
6179303f9f
23
namecheap.tf
23
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 {
|
||||
|
|
Loading…
Reference in New Issue