Closed eugene-marchanka closed 1 year ago
Hi @eugene-marchanka
According to the README file use next custom field format:
⚠️ NOTE on custom fields: PHPIPAM installations with custom fields must have all fields set to optional when using this plugin. For more info see https://github.com/phpipam/phpipam/issues/1073. Further to this, either ensure that your fields also do not have default values, or ensure the default is set in your TF configuration. Diff loops may happen otherwise! Custom fileds must contain mandatory prefix custom_.
Example:
data "phpipam_section" "section" {
name = "Customers"
}
resource "phpipam_subnet" "subnet" {
section_id = data.phpipam_section.section.section_id
subnet_address = "10.10.3.0"
subnet_mask = 24
custom_fields = {
custom_CustomTestSubnets = "terraform-test"
}
}
Was able to solve it by providing empty custom_fields
and specific lifecycle
:
resource "phpipam_first_free_subnet" "new_subnet" {
parent_subnet_id = data.phpipam_subnet.master-subnet.subnet_id
subnet_mask = var.vpc_subnet_cidr_length
description = format("EKS subnet for %s", var.cluster_domain)
vrf_id = 1
is_full = true
custom_fields = {}
lifecycle {
ignore_changes = [
section_id
]
}
}
I'm recently upgraded to
1.5.2
and started getting error:.tf
is pretty standard:Any ideas why it is failing? Thanks!