Skip to content

Commit 1811fd6

Browse files
authored
fix(cynosdb): [122359725] tencentcloud_cynosdb_cluster optimize ro group sg (#3203)
* add * add
1 parent 38335e3 commit 1811fd6

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.changelog/3203.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_cynosdb_cluster: optimize ro group sg
3+
```

tencentcloud/services/cynosdb/extension_cynosdb.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ const (
2626
CYNOSDB_DEFAULT_OFFSET = 0
2727
CYNOSDB_MAX_LIMIT = 100
2828

29-
CYNOSDB_INSGRP_HA = "ha"
30-
CYNOSDB_INSGRP_RO = "ro"
29+
CYNOSDB_INSGRP_HA = "ha"
30+
CYNOSDB_INSGRP_RO = "ro"
31+
CYNOSDB_INSGRP_SINGLERO = "singleRo"
3132

3233
// 0-成功,1-失败,2-处理中
3334
CYNOSDB_FLOW_STATUS_SUCCESSFUL = "0"

tencentcloud/services/cynosdb/resource_tc_cynosdb_cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ func resourceTencentCloudCynosdbClusterCreate(d *schema.ResourceData, meta inter
337337
for _, insGrp := range insGrps.Response.InstanceGrpInfoList {
338338
if *insGrp.Type == CYNOSDB_INSGRP_HA {
339339
rwGroupId = *insGrp.InstanceGrpId
340-
} else if *insGrp.Type == CYNOSDB_INSGRP_RO {
340+
} else if *insGrp.Type == CYNOSDB_INSGRP_RO || *insGrp.Type == CYNOSDB_INSGRP_SINGLERO {
341341
roGroupIds = append(roGroupIds, *insGrp.InstanceGrpId)
342342
}
343343
}
@@ -499,7 +499,7 @@ func resourceTencentCloudCynosdbClusterRead(d *schema.ResourceData, meta interfa
499499
"ip": *insGrp.Vip,
500500
"port": *insGrp.Vport,
501501
})
502-
} else if *insGrp.Type == CYNOSDB_INSGRP_RO {
502+
} else if *insGrp.Type == CYNOSDB_INSGRP_RO || *insGrp.Type == CYNOSDB_INSGRP_SINGLERO {
503503
roGroupId = *insGrp.InstanceGrpId
504504
_ = d.Set("ro_group_id", roGroupId)
505505
for _, roIns := range insGrp.InstanceSet {

0 commit comments

Comments
 (0)