pan-net / terraform-provider-powerdns

Terraform PowerDNS provider
https://www.terraform.io/docs/providers/powerdns/
Mozilla Public License 2.0
44 stars 48 forks source link

Records with upper case characters are not destroyed #82

Open getSurreal opened 3 years ago

getSurreal commented 3 years ago

PowerDNS 4.4

If you pass in an upper case name, it gets created, but is converted to lowercase in powerDNS. When you run a destroy on the same state, it does not delete the record assumingely because the case does not match. I would think that a case conversion should happen in the provider or throw an error because of case.

I'm new to PowerDNS. I was not able to find a configuration setting the enables uppercase records.

Terraform Version

0.13.5

Affected Resource(s)

powerdns_record

Terraform Configuration Files

resource "powerdns_record" "A" {
  zone    = "example.com."
  name    = "Test.example.com."
  type    = "A"
  ttl     = 300
  records = ["192.168.0.110"]
}

Expected Behavior

If it creates the record, it should be able to destroy it.

Actual Behavior

Creates the record, but does not destroy

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. terraform destroy

Important Factoids

References

PetrusHahol commented 3 years ago

Thank you for reporting this issue. The problem is valid not only name field of record resource, but for zone field as well. Also name field of zone resource has the the issue. I will work on it and create MR.