diff --git a/examples/e2e/aws/resource_cluster.tf b/examples/e2e/aws/resource_cluster.tf index e9d0a1c0..d0cc9c33 100644 --- a/examples/e2e/aws/resource_cluster.tf +++ b/examples/e2e/aws/resource_cluster.tf @@ -38,14 +38,14 @@ resource "spectrocloud_cluster_aws" "cluster" { count = 1 instance_type = "t3.large" disk_size_gb = 62 - azs = [var.aws_region_az] + azs = var.aws_region_az } machine_pool { name = "worker-basic" count = 1 instance_type = "t3.large" - azs = [var.aws_region_az] + azs = var.aws_region_az } } diff --git a/spectrocloud/cluster_common_hash.go b/spectrocloud/cluster_common_hash.go index 3a0989ca..677afb9d 100644 --- a/spectrocloud/cluster_common_hash.go +++ b/spectrocloud/cluster_common_hash.go @@ -375,6 +375,30 @@ func resourceMachinePoolEdgeNativeHash(v interface{}) int { if staticIP, ok := hostMap["static_ip"]; ok { buf.WriteString(fmt.Sprintf("static_ip:%s-", staticIP.(string))) } + + if nicName, ok := hostMap["nic_name"]; ok { + buf.WriteString(fmt.Sprintf("nic_name:%s-", nicName.(string))) + } + + if defaultGateway, ok := hostMap["default_gateway"]; ok { + buf.WriteString(fmt.Sprintf("default_gateway:%s-", defaultGateway.(string))) + } + + if subnetMask, ok := hostMap["subnet_mask"]; ok { + buf.WriteString(fmt.Sprintf("subnet_mask:%s-", subnetMask.(string))) + } + + if dnsServers, ok := hostMap["dns_servers"]; ok { + var dns []string + for _, v := range dnsServers.(*schema.Set).List() { + dns = append(dns, v.(string)) + } + buf.WriteString(fmt.Sprintf("dns_servers:%s-", strings.Join(dns, ","))) + } + + if twoNodeRole, ok := hostMap["two_node_role"]; ok { + buf.WriteString(fmt.Sprintf("two_node_role:%s-", twoNodeRole.(string))) + } } } diff --git a/spectrocloud/resource_cluster_edge_native.go b/spectrocloud/resource_cluster_edge_native.go index 30c97441..88c2aec1 100644 --- a/spectrocloud/resource_cluster_edge_native.go +++ b/spectrocloud/resource_cluster_edge_native.go @@ -411,8 +411,6 @@ func flattenClusterConfigsEdgeNative(cloudConfig map[string]interface{}, config if config.Spec.ClusterConfig.ControlPlaneEndpoint.Host != "" { if v, ok := cloudConfig["vip"]; ok && v.(string) != "" { m["vip"] = config.Spec.ClusterConfig.ControlPlaneEndpoint.Host - } else { - m["vip"] = config.Spec.ClusterConfig.ControlPlaneEndpoint.Host } } if config.Spec.ClusterConfig.NtpServers != nil {