Add configuration for CoreDNS and update host variables for lab environment
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
|
||||
locals {
|
||||
configfile = templatefile("${path.module}/resources/Corefile.tpl", {
|
||||
zones = var.zones
|
||||
forward_dns_servers = join(" ", var.forward_dns_servers)
|
||||
})
|
||||
configfile_checksum = md5(local.configfile)
|
||||
db_files = {
|
||||
for z in var.zones : z.fqdn => templatefile("${path.module}/resources/db.zone.tpl", {
|
||||
fqdn = z.fqdn
|
||||
domain_master = z.domain_master
|
||||
timestamp = formatdate("YYYYMMDD", timestamp())
|
||||
refresh_rate = z.refresh_rate
|
||||
retry_rate = z.retry_rate
|
||||
expire_time = z.expire_time
|
||||
ttl = z.ttl
|
||||
records = z.records
|
||||
})
|
||||
}
|
||||
db_files_checksum = md5(jsonencode(local.db_files))
|
||||
}
|
||||
Reference in New Issue
Block a user