infobloxopen / terraform-provider-infoblox

Infoblox NIOS Terraform Provider
https://github.com/infobloxopen/terraform-provider-infoblox
Mozilla Public License 2.0
73 stars 81 forks source link

infoblox_ptr_record resource is not persisting IPv6 address to tfstate #233

Open utilitynerd opened 2 years ago

utilitynerd commented 2 years ago

Creating a simple infoblox_ptr_record like:

resource "infoblox_ptr_record" "test_ptr_v6" { ptrdname = "testptr_v6.example.com" ip_addr = "2001:db8::10" }

results in a tfstate entry like:

{
  "mode": "managed",
  "type": "infoblox_ptr_record",
  "name": "test_ptr_v6",
  "provider": "provider[\"registry.terraform.io/infobloxopen/infoblox\"]",
  "instances": [
    {
      "schema_version": 0,
      "attributes": {
        "cidr": null,
        "comment": null,
        "dns_view": "default",
        "ext_attrs": null,
        "id": "record:ptr<....snip...>:0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa/default",
        "ip_addr": "",
        "network_view": "default",
        "ptrdname": "testptr_v6.example.com",
        "record_name": null,
        "ttl": -2147483648
      },
      "sensitive_attributes": [],
      "private": "bnVsbA=="
    }
  ]
}

While I've confirmed the record is successfully created in Infoblox (and is correct in the id field), The ip_addr field is blank in the tfstate file. This causes the record to be updated every time terraform apply is run.

I only see this issue when ip_addr is an IPv6 address. IPv4 addresses work as expected.