Skip to content

A record value read back as hex-encoded IP on Windows Server 2025 DNS, causing update to fail with Remove-DnsServerResourceRecord : InputObject ... invalid value #85

Description

@7wingfly

Provider version: 1.0.5

Environment: Windows DNS server upgraded to Windows Server 2025 (previously working fine on Server 2012 R2)
Description:

Since upgrading my Windows DNS servers to Windows Server 2025, plans shows an in-place update for every existing windns_record A record, even though none of the IPs have actually changed. The records value read back from the DNS server comes back as a hex-encoded string instead of dotted-decimal. e.g. C0A800EA is 192.168.0.234 in hex. This affects all A records in state.

  ~ resource "windns_record" "dns_record" {
        id         = "srv-k8s-blue-node01_7wingfly.net._A"
        name       = "srv-k8s-blue-node01"
      ~ records    = [
          - "C0A800DD",
          + "192.168.0.221",
        ]
        # (3 unchanged attributes hidden)
    }
  # ...and identically for srv-k8s-blue-node02 (C0A800DE -> 192.168.0.222),
  # srv-k8s-brown-node01 (C0A80016 -> 192.168.0.22),
  # srv-k8s-green-node01 (C0A800E7 -> 192.168.0.231),
  # srv-k8s-green-node02 (C0A800E8 -> 192.168.0.232),
  # srv-k8s-green-node03 (C0A800E9 -> 192.168.0.233),
  # srv-k8s-green-node04 (C0A800EA -> 192.168.0.234)

Applying this plan fails with the error:

│ Error: error while deleting a record object with id "srv-k8s-test3-node01_7wingfly.net._A_false": Remove-DnsServerResourceRecord exited with a non zero exit code (1), stderr: #< CLIXML
│ <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">Remove-DnsServerResourceRecord : InputObject for resource record has an invalid value. Failed to remove the resource _x000D__x000A_</S><S S="Error">record on srv-dc01.7wingfly.net server. Please check extended error for additional details._x000D__x000A_</S><S S="Error">At line:1 char:42_x000D__x000A_</S><S S="Error">+ ... lyContinue';Remove-DnsServerResourceRecord -Force -ZoneName 7wingfly. ..._x000D__x000A_</S><S S="Error">+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~_x000D__x000A_</S><S S="Error">    + CategoryInfo          : InvalidData: (srv-dc01.7wingfly.net:root/Microsoft/...rResourceRecord) [Remove-DnsServer _x000D__x000A_</S><S S="Error">   ResourceRecord], CimException_x000D__x000A_</S><S S="Error">    + FullyQualifiedErrorId : WIN32 13,Remove-DnsServerResourceRecord_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>

Sometimes though after a while it stops reporting that there is a change in the plan and continues as though nothing happened, with no changes to the Terraform config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions