https://github.com/udienz/terraform-module-named
Terraform module for named/bind9
https://github.com/udienz/terraform-module-named
bind bind9 dns dns-server iac-terraform terraform
Last synced: about 2 months ago
JSON representation
Terraform module for named/bind9
- Host: GitHub
- URL: https://github.com/udienz/terraform-module-named
- Owner: udienz
- License: gpl-3.0
- Created: 2025-01-22T02:03:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-05T09:17:07.000Z (about 1 year ago)
- Last Synced: 2025-02-05T09:30:49.252Z (about 1 year ago)
- Topics: bind, bind9, dns, dns-server, iac-terraform, terraform
- Language: HCL
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform module named/bind
This module are designed to be used to manage dns record while using bind/named
## Install
To make this module work, please make sure:
1. You have rndc key and configured in named.conf. Please edit with your setup.
```/etc/rndc.key
key "rndc-key" {
algorithm hmac-sha256;
secret "Y1PkZgy10ett0pmb0+KAueE1MyI9aPBZzrc76flKEmw=";
};
options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};
```
1. Configure domain as primary and allow the key.
```
key "rndc-key" {
algorithm hmac-sha256;
secret "Y1PkZgy10ett0pmb0+KAueE1MyI9aPBZzrc76flKEmw=";
};
#
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
.... //some domains
zone "example.com." IN {
type master;
file "/var/cache/bind/example.com.db";
zone-statistics yes;
allow-update { key rndc-key; };
};
```
1. Save and restart the named daemon
1. Crete base directory and create terraform file to load the module. See [example/example.tf](example/example.tf)
1. Create a files that contain variables to support the terraform file. See [example/input.auto.tfvars.json](example/input.auto.tfvars.json) and subtitute source with `source = "github.com/udienz/terraform-module-named"`
1. See below for the directory contents
```
$ ls -1
example.tf
input.auto.tfvars.json
```
1. Run terraform plan, review and apply