.:53 {
%{ if override_hosts ~}
    hosts {
%{ for h in hosts ~}
      ${h.ip} ${h.name}
%{ endfor ~}
      fallthrough
    }
%{ endif ~}
    errors
    health {
      lameduck 5s
    }
    ready
    log . {
      class error
    }
    prometheus :9153
    forward . ${forward_dns_servers}
    cache 30
    loop
    reload
    loadbalance
}

%{ for z in zones ~}
${z.fqdn}:53 {
    file /etc/coredns/db.${z.fqdn}
    log
    errors
}
%{ endfor ~}