Skip to content

fix(cynosdb): [122359725] tencentcloud_cynosdb_cluster optimize ro group sg #3203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3203.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_cynosdb_cluster: optimize ro group sg
```
5 changes: 3 additions & 2 deletions tencentcloud/services/cynosdb/extension_cynosdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ const (
CYNOSDB_DEFAULT_OFFSET = 0
CYNOSDB_MAX_LIMIT = 100

CYNOSDB_INSGRP_HA = "ha"
CYNOSDB_INSGRP_RO = "ro"
CYNOSDB_INSGRP_HA = "ha"
CYNOSDB_INSGRP_RO = "ro"
CYNOSDB_INSGRP_SINGLERO = "singleRo"

// 0-成功,1-失败,2-处理中
CYNOSDB_FLOW_STATUS_SUCCESSFUL = "0"
Expand Down
4 changes: 2 additions & 2 deletions tencentcloud/services/cynosdb/resource_tc_cynosdb_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func resourceTencentCloudCynosdbClusterCreate(d *schema.ResourceData, meta inter
for _, insGrp := range insGrps.Response.InstanceGrpInfoList {
if *insGrp.Type == CYNOSDB_INSGRP_HA {
rwGroupId = *insGrp.InstanceGrpId
} else if *insGrp.Type == CYNOSDB_INSGRP_RO {
} else if *insGrp.Type == CYNOSDB_INSGRP_RO || *insGrp.Type == CYNOSDB_INSGRP_SINGLERO {
roGroupIds = append(roGroupIds, *insGrp.InstanceGrpId)
}
}
Expand Down Expand Up @@ -499,7 +499,7 @@ func resourceTencentCloudCynosdbClusterRead(d *schema.ResourceData, meta interfa
"ip": *insGrp.Vip,
"port": *insGrp.Vport,
})
} else if *insGrp.Type == CYNOSDB_INSGRP_RO {
} else if *insGrp.Type == CYNOSDB_INSGRP_RO || *insGrp.Type == CYNOSDB_INSGRP_SINGLERO {
roGroupId = *insGrp.InstanceGrpId
_ = d.Set("ro_group_id", roGroupId)
for _, roIns := range insGrp.InstanceSet {
Expand Down
Loading