terraform-provider-pihole icon indicating copy to clipboard operation
terraform-provider-pihole copied to clipboard

Creation of DNS records broken

Open MaximeMnt opened this issue 8 months ago • 2 comments

Looks like the creation of DNS records are broken. I'm getting the following error message: 2024-06-03T23:48:54.149+0200 [ERROR] vertex "pihole_dns_record.dns_record[\"aa.com\"]" error: failed to parse customDNS response body: invalid character '<' looking for beginning of value

This is my code:

resource "pihole_dns_record" "dns_record" {
    for_each = {for record in var.dns_records: record.domain => record}
    domain = each.value.domain
    ip = each.value.ip
}

And variables:

dns_records = {
  aa= {
    domain = "aa.com",
    ip     = "10.0.0.1"
  },
}

Looks like the response from pihole has changed over the years. Is it possible to get an update?

EDIT: My pihole version: Pi-hole v5.18.2 FTL v5.25.2 Web Interface v5.21

MaximeMnt avatar Jun 03 '24 22:06 MaximeMnt