nutanix / terraform-provider-nutanix

Terraform Nutanix Provider
https://www.terraform.io/docs/providers/nutanix/
Mozilla Public License 2.0
95 stars 111 forks source link

Subnet update crash provider #539

Open nfrappart opened 1 year ago

nfrappart commented 1 year ago

Nutanix Cluster Information

Terraform Version

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

Affected Resource(s)

nutanix_subnet

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](https://gist.github.com/nfrappart)/[gist:c48ae093fc22ff4a226a2dde45bb9de4](https://gist.github.com/nfrappart/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.
​
abhimutant commented 1 year ago

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

nfrappart commented 1 year ago

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.