{"id":41740727,"url":"https://github.com/dklesev/terraform-provider-pihole","last_synced_at":"2026-01-25T00:13:13.960Z","repository":{"id":333573477,"uuid":"1123820085","full_name":"dklesev/terraform-provider-pihole","owner":"dklesev","description":"Terraform provider for pihole","archived":false,"fork":false,"pushed_at":"2026-01-19T22:19:28.000Z","size":115,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-20T05:32:11.695Z","etag":null,"topics":["pihole","terraform-provider"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dklesev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-27T17:36:06.000Z","updated_at":"2026-01-19T22:19:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dklesev/terraform-provider-pihole","commit_stats":null,"previous_names":["dklesev/terraform-provider-pihole"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dklesev/terraform-provider-pihole","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dklesev%2Fterraform-provider-pihole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dklesev%2Fterraform-provider-pihole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dklesev%2Fterraform-provider-pihole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dklesev%2Fterraform-provider-pihole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dklesev","download_url":"https://codeload.github.com/dklesev/terraform-provider-pihole/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dklesev%2Fterraform-provider-pihole/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28739429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T22:12:27.248Z","status":"ssl_error","status_checked_at":"2026-01-24T22:12:10.529Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pihole","terraform-provider"],"created_at":"2026-01-25T00:13:13.893Z","updated_at":"2026-01-25T00:13:13.954Z","avatar_url":"https://github.com/dklesev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Provider for Pi-hole v6\n\n[![Tests](https://github.com/dklesev/terraform-provider-pihole/actions/workflows/test.yml/badge.svg)](https://github.com/dklesev/terraform-provider-pihole/actions/workflows/test.yml)\n[![Go](https://img.shields.io/badge/Go-1.21+-00ADD8?logo=go)](https://go.dev/)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nA Terraform/OpenTofu provider for managing [Pi-hole](https://pi-hole.net/) v6+ instances via the FTL REST API.\n\n\u003e ⚠️ **Important**: This provider requires Pi-hole v6.0 or later. It will NOT work with Pi-hole v5.x.\n\n## Features\n\n- **Full CRUD support** for 18 Pi-hole resources\n- **Import support** for all resources\n- **Automatic retry logic** for transient network errors\n- **Session management** with automatic re-authentication\n- Works with both **Terraform** and **OpenTofu**\n\n## Installation\n\n```hcl\nterraform {\n  required_providers {\n    pihole = {\n      source  = \"dklesev/pihole\"\n      version = \"~\u003e 1.0\"\n    }\n  }\n}\n```\n\n## Configuration\n\n```hcl\nprovider \"pihole\" {\n  url      = \"http://pi.hole\"      # or PIHOLE_URL env var\n  password = \"your-password\"        # or PIHOLE_PASSWORD env var (recommended)\n  \n  # Optional settings\n  timeout                  = 30     # HTTP timeout in seconds\n  tls_insecure_skip_verify = false  # Skip TLS certificate verification\n}\n```\n\n### Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `PIHOLE_URL` | Pi-hole instance URL (e.g., `http://pi.hole`) |\n| `PIHOLE_PASSWORD` | Pi-hole web interface password (**recommended** over config) |\n\n\u003e 💡 **Tip**: Use environment variables for the password to avoid storing secrets in state files.\n\n## Quick Start\n\n```hcl\nresource \"pihole_group\" \"trusted\" {\n  name        = \"trusted_devices\"\n  description = \"Devices with relaxed blocking\"\n}\n\nresource \"pihole_client\" \"laptop\" {\n  client  = \"192.168.1.100\"\n  groups  = [pihole_group.trusted.id]\n  comment = \"My laptop\"\n}\n\nresource \"pihole_domain\" \"ads\" {\n  domain = \"ads.example.com\"\n  type   = \"deny\"\n  kind   = \"exact\"\n}\n\nresource \"pihole_list\" \"blocklist\" {\n  address = \"https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/adblock/pro.txt\"\n  type    = \"block\"\n}\n```\n\n## Resources\n\n### Core Resources\n\n| Resource | Description |\n|----------|-------------|\n| `pihole_group` | Manage groups for organizing clients and rules |\n| `pihole_client` | Manage clients (IP, MAC, hostname, subnet) |\n| `pihole_domain` | Manage allow/deny domains (exact/regex) |\n| `pihole_list` | Manage blocklist/allowlist subscriptions |\n\n### DNS Resources\n\n| Resource | Description |\n|----------|-------------|\n| `pihole_dns_blocking` | Control global DNS blocking state |\n| `pihole_dns_upstream` | Manage upstream DNS servers |\n| `pihole_local_dns` | Manage local A records (hostname → IP) |\n| `pihole_cname_record` | Manage local CNAME records |\n\n### DHCP Resources\n\n| Resource | Description |\n|----------|-------------|\n| `pihole_dhcp_static_lease` | Manage DHCP static leases (MAC → IP) |\n\n### Configuration Resources\n\n| Resource | Description |\n|----------|-------------|\n| `pihole_config_dns` | DNS server settings (port, caching, rate limiting) |\n| `pihole_config_dhcp` | DHCP server settings (range, lease time) |\n| `pihole_config_misc` | Miscellaneous settings (privacy, temp units) |\n| `pihole_config_ntp` | NTP server configuration |\n| `pihole_config_resolver` | Resolver settings (network, refresh) |\n| `pihole_config_database` | Database settings (query logging, FTL) |\n| `pihole_config_webserver` | Web interface settings (port, session) |\n| `pihole_config_files` | File path settings (logs, gravity) |\n| `pihole_config_debug` | Debug settings (various debug flags) |\n\n## Data Sources\n\n| Data Source | Description |\n|-------------|-------------|\n| `pihole_groups` | List all groups |\n| `pihole_clients` | List all clients |\n| `pihole_domains` | List domains (with filtering by type/kind) |\n| `pihole_lists` | List subscriptions (with filtering by type) |\n\n## Documentation\n\nFull documentation is available on the [Terraform Registry](https://registry.terraform.io/providers/dklesev/pihole/latest/docs) or in the [`docs/`](./docs) folder.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.\n\n## License\n\nMIT - see [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdklesev%2Fterraform-provider-pihole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdklesev%2Fterraform-provider-pihole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdklesev%2Fterraform-provider-pihole/lists"}