Skip to content

Commit 6626787

Browse files
committed
hash fix
1 parent dca5f4d commit 6626787

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

spectrocloud/cluster_common_hash.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,7 @@ func resourceMachinePoolVsphereHash(v interface{}) int {
282282
func resourceMachinePoolCustomCloudHash(v interface{}) int {
283283
m := v.(map[string]interface{})
284284
var buf bytes.Buffer
285-
if _, ok := m["name"]; ok {
286-
buf.WriteString(HashStringMap(m["name"]))
287-
}
288-
if _, ok := m["count"]; ok {
289-
buf.WriteString(HashStringMap(m["count"]))
290-
}
291-
if _, ok := m["additional_labels"]; ok {
292-
buf.WriteString(HashStringMap(m["additional_labels"]))
293-
}
285+
294286
if _, ok := m["taints"]; ok {
295287
buf.WriteString(HashStringMapList(m["taints"]))
296288
}

spectrocloud/resource_cluster_custom_cloud.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,10 @@ func resourceClusterCustomCloudUpdate(ctx context.Context, d *schema.ResourceDat
364364
log.Printf("[DEBUG] === MACHINE POOL CHANGE DETECTED ===")
365365
oraw, nraw := d.GetChange("machine_pool")
366366
if oraw == nil {
367-
oraw = schema.NewSet(resourceMachinePoolCustomCloudHash, []interface{}{})
367+
oraw = new(schema.Set) //schema.NewSet(resourceMachinePoolCustomCloudHash, []interface{}{})
368368
}
369369
if nraw == nil {
370-
nraw = schema.NewSet(resourceMachinePoolCustomCloudHash, []interface{}{})
370+
nraw = new(schema.Set) //schema.NewSet(resourceMachinePoolCustomCloudHash, []interface{}{})
371371
}
372372

373373
os := oraw.(*schema.Set)

0 commit comments

Comments
 (0)