Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.8 KB

README.md

File metadata and controls

56 lines (38 loc) · 1.8 KB

terraform-pihole-dns

Terraform module for PiHole local dns records

Provider Configuration

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>"
}

Requirements

Name Version
pihole ~> 0.0.12

Providers

Name Version
pihole 0.0.12

Modules

No modules.

Resources

Name Type
pihole_cname_record.cname_record resource
pihole_dns_record.a_record resource

Inputs

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

Outputs

No outputs.