Skip to content

Commit 4930720

Browse files
authored
fix(crs): [122119363] modify replica_zone_ids (#3184)
* fix(crs): [122119363] modify replica_zone_ids * feat: add changelog
1 parent e9d366e commit 4930720

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

.changelog/3184.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_redis_instance: Restore the replica_zone_id logic
3+
```

tencentcloud/services/crs/resource_tc_redis_instance.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ func resourceTencentCloudRedisInstanceRead(d *schema.ResourceData, meta interfac
641641
}
642642
}
643643

644-
if info.NodeSet != nil && len(info.NodeSet) > 0 {
644+
if info.NodeSet != nil {
645645
var zoneIds []int
646646
var nodeInfos []interface{}
647647
for i := range info.NodeSet {
@@ -670,20 +670,6 @@ func resourceTencentCloudRedisInstanceRead(d *schema.ResourceData, meta interfac
670670
if !zoneIdsEqual {
671671
_ = d.Set("replica_zone_ids", zoneIds)
672672
}
673-
674-
if replicaZonesOk && zoneIdsEqual {
675-
zoneIds := helper.InterfacesIntegers(replicaZones.([]interface{}))
676-
zoneIsSet := true
677-
for _, v := range zoneIds {
678-
if v != int(*info.ZoneId) {
679-
zoneIsSet = false
680-
break
681-
}
682-
}
683-
if zoneIsSet {
684-
_ = d.Set("replica_zone_ids", replicaZones)
685-
}
686-
}
687673
}
688674
//internal version: replace resourceTag begin, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.
689675
tcClient := meta.(tccommon.ProviderMeta).GetAPIV3Conn()

0 commit comments

Comments
 (0)