Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/methridge/consul2zone
Creating a BIND zone from Consul services
https://github.com/methridge/consul2zone
hashicorp-consul hashicorp-consul-service
Last synced: 20 days ago
JSON representation
Creating a BIND zone from Consul services
- Host: GitHub
- URL: https://github.com/methridge/consul2zone
- Owner: methridge
- License: mit
- Created: 2021-05-24T19:16:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-08T20:20:32.000Z (over 3 years ago)
- Last Synced: 2024-10-27T06:52:41.592Z (2 months ago)
- Topics: hashicorp-consul, hashicorp-consul-service
- Language: HCL
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Consul to BIND Zone
[Consul Template](https://github.com/hashicorp/consul-template) to read all
services registered in [Consul](https://www.consul.io/) and create a
[BIND](https://www.isc.org/bind/) zone file.## Usage
The `dns.tmpl` file is the base for your zone file. Include your SOA
information, NS, MX and other static records for your zone.The template uses the unix timestamp as the serial number so you get automatic
incrementing.Update the `template.hcl` file to include your Consul ACL token, if needed. And
if desired a post-exec command or script validate your zone file and reload
bind.Once ready this can be run via the following command, with debug logging
```shell
consul-template -config=template.hcl -log-level=debug
```