Terraform module for PiHole local dns records
The PiHole
provider must be configured. This can be done by setting the following environment variables:
PIHOLE_URL
- URL of your PiHole server.PIHOLE_API_TOKEN
- API Token for you PiHole admin user.
This module was NOT tested using the PIHOLE_PASSWORD
authentication option. It may or may not work as expected.
You can also configure the provider with a provider
block like this:
provider "pihole" {
url = "<PIHOLE_URL>"
api_token = "<PIHOLE_API_TOKEN>"
}
Name | Version |
---|---|
pihole | ~> 0.0.12 |
Name | Version |
---|---|
pihole | 0.0.12 |
No modules.
Name | Type |
---|---|
pihole_cname_record.cname_record | resource |
pihole_dns_record.a_record | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
a_records | A records to create in PiHole. Should be a map of strings, the key name will be used for domain, and value for IP address. | map(string) |
{} |
no |
cname_records | CNAME records to create. Should be a map of strings, the key name will be used for domain, and value for target. | map(string) |
{} |
no |
No outputs.