nutanix / terraform-provider-nutanix

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

Terraform plan try to delete network when Nutanix Aplos raise an error (503) #572

Open Fen0l opened 1 year ago

Fen0l commented 1 year ago

We are getting a strange issue where authentication failed and terraform continue to work. Even when we trigger a terraform plan.

Our current LDAP auth does not work as expect and give random 503 error (Server is busy). When running terraform plan on a simple terraform definition with one network and one karbon cluster, it will try to delete the network.

The worrying thing is that it will try to delete a resource even when requesting a plan. It might also affect other resources.

Nutanix Cluster Information

Also tried with 1.7.1 and 1.8.0 with the same result

Affected Resource(s)

Terraform Configuration Files

/*resource "nutanix_subnet" "nutanix_networks" {
    name                             = "NTX_1"
    cluster_uuid                     = "UUID"
    vlan_id                          = "10"
    default_gateway_ip               = IP_GW
    subnet_ip                        = IP_SUB
    ip_config_pool_list_ranges       = []
    prefix_length                    = 24

    vswitch_name                     = "br0"
    subnet_type                      = "VLAN"
    dhcp_domain_name_server_list     = ["IPs"]
    dhcp_domain_search_list          = ["DOMAIN.LOCAL"]
    dhcp_options                     = {
        "boot_file_name"   = ""
        "domain_name"      = "DOMAIN.LOCAL"
        "tftp_server_name" = ""
    }
}*/

Debug Output

Expected Behavior

Terraform should end without triggering any updates.

Actual Behavior

Terraform detect changes on the network and try to delete it. As the network is already in use, Nutanix does not delete it but fail the task.

Steps to Reproduce

Our LDAP Authentication does not work as expect. So aplos is unable to authenticate and raise a 503 error Server is busy.

  1. Configure a broken LDAP (unsure how to reproduce the issue)
  2. run terraform plan
  3. Notice that the network is trying to be deleted

​ KR,

abhimutant commented 1 year ago

Hi @Fen0l , Is this still happening ?