diff --git a/pkg/multicloud/aliyun/dbinstance.go b/pkg/multicloud/aliyun/dbinstance.go index 964a0a480a..cff9bab57f 100644 --- a/pkg/multicloud/aliyun/dbinstance.go +++ b/pkg/multicloud/aliyun/dbinstance.go @@ -346,12 +346,17 @@ func (rds *SDBInstance) GetInternalConnectionStr() string { return "" } + str := "" for _, net := range rds.netInfo { if net.IPType != "Public" { - return net.ConnectionString + if net.IPType == "Private" { + return net.ConnectionString + } else if net.IPType == "Inner" { + str = net.ConnectionString + } } } - return "" + return str } func (rds *SDBInstance) GetConnectionStr() string {