Skip to content

Commit 6819428

Browse files
authored
Fix bugs (#600)
1 parent 0ffccba commit 6819428

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tencentcloud/resource_tc_kubernetes_cluster.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,10 @@ func tkeGetCvmRunInstancesPara(dMap map[string]interface{}, meta interface{},
10781078
request.InstanceCount = &count
10791079

10801080
if v, ok := dMap["hostname"]; ok {
1081-
request.HostName = helper.String(v.(string))
1081+
hostname := v.(string)
1082+
if hostname != "" {
1083+
request.HostName = &hostname
1084+
}
10821085
}
10831086

10841087
cvmJson = request.ToJsonString()

tencentcloud/service_tencentcloud_postgresql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func (me *PostgresqlService) DescribePostgresqlInstanceById(ctx context.Context,
227227
errRet = err
228228
return
229229
}
230-
if ee.Code == "InvalidParameter" {
230+
if ee.Code == "InvalidParameter" || ee.Code == "ResourceNotFound.InstanceNotFoundError" {
231231
errRet = nil
232232
} else {
233233
errRet = err

0 commit comments

Comments
 (0)