Skip to content

Commit 1741ac6

Browse files
author
hellertang
authored
mongo fix status query (#797)
1 parent e57b7ee commit 1741ac6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tencentcloud/service_tencentcloud_mongodb.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ func (me *MongodbService) DescribeInstanceById(ctx context.Context, instanceId s
3030
}
3131

3232
if result != nil && result.Response != nil {
33-
if len(result.Response.InstanceDetails) != 0 && *result.Response.InstanceDetails[0].Status == MONGODB_INSTANCE_STATUS_PROCESSING {
33+
if len(result.Response.InstanceDetails) != 0 && (*result.Response.InstanceDetails[0].Status == MONGODB_INSTANCE_STATUS_PROCESSING ||
34+
*result.Response.InstanceDetails[0].Status == MONGODB_INSTANCE_STATUS_INITIAL) {
3435
return resource.RetryableError(fmt.Errorf("mongodb instance status is processing"))
3536
}
3637
response = result

0 commit comments

Comments
 (0)