Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spurious "No custom fields defined" error #81

Closed
tseeker opened this issue Aug 20, 2023 · 0 comments
Closed

Spurious "No custom fields defined" error #81

tseeker opened this issue Aug 20, 2023 · 0 comments

Comments

@tseeker
Copy link
Contributor

tseeker commented Aug 20, 2023

I am managing a bunch of addresses in a phpIPAM instance that has no custom fields defined, as the screenshot below shows.

no-custom-fields

The resource definitions are pretty straightforward:

resource "phpipam_address" "ipv6" {
  for_each = local.addr_allocations

  subnet_id   = data.phpipam_subnet.subnet6[each.value.network].subnet_id
  hostname    = each.value.dns_name
  description = each.value.description
}

Resource creation works fine in all cases. However, when trying to update these resources (in my specific case, due to a change in description), I get the following error for each updated resource:

│ Error: Error getting custom fields for updating: Error from API (404): No custom fields defined
│
│   with module.autobuild.phpipam_address.ipv6["..."],
│   on autobuild/ipam.tf line 73, in resource "phpipam_address" "ipv6":
│   73: resource "phpipam_address" "ipv6" {

Despite the error, the IP address record is actually updated in phpIPAM. However I still need to re-run Terraform for the state to update.

I have tried adding an empty custom_fields entry (as mentioned in #73), but that had no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants