terraform-provider-nutanix icon indicating copy to clipboard operation
terraform-provider-nutanix copied to clipboard

Subnet update crash provider

Open nfrappart opened this issue 2 years ago • 2 comments

Nutanix Cluster Information

  • Nutanix Cluster (Prism Element / AOS): AOS 6.5
  • Nutanix Prism Central: pc.2022.6.0.1

Terraform Version

terraform 1.3.7 provider 1.7.1 (same issue with 1.8.0-beta3)

Affected Resource(s)

nutanix_subnet

  • nutanix_XXXXX

Terraform Configuration Files


variable "dns" {
  description = "DNS server list for DHCP"
  type = list
  default = ["10.x.x.x","10.x.x.x"]
}
resource "nutanix_subnet" "subnet" {
  for_each                   = local.subnets
  cluster_uuid               = data.nutanix_clusters.clusters.entities.0.metadata.uuid
  name                       = each.key
  vlan_id                    = each.value.vlan_id
  subnet_type                = "VLAN"
  prefix_length              = each.value.prefix_length
  default_gateway_ip         = each.value.default_gateway_ip
  subnet_ip                  = each.value.subnet_ip
  ip_config_pool_list_ranges = each.value.ip_config_pool_list_ranges
  dhcp_domain_name_server_list = var.dns
}

Debug Output

nfrappart/gist:c48ae093fc22ff4a226a2dde45bb9de4

Expected Behavior

Apply should just update DNS server list for each subnet managed by terraform (none are set before apply).

Actual Behavior

Apply crash. Operation is cancelled.

Steps to Reproduce

add dhcp_domain_name_server_list =attribute to a nutanix_subnet ressource, and terraform apply inevitably crashes. ​

nfrappart avatar Jan 26 '23 11:01 nfrappart

Hi, can you check the API responses in the log , whether any API is failing or not.

abhimutant avatar Mar 15 '23 06:03 abhimutant

Hi, thanks for your reply. I had to work around the issue (UI change, then state refresh), and it's now in production so I can't reproduce easily right now. I'll post back here when I try again and check the logs.

nfrappart avatar Mar 15 '23 09:03 nfrappart