Skip to content

Commit 3422f72

Browse files
authored
fix(clb): [121566528] tencentcloud_clb_target_group_instance_attachment update function support retry (#3069)
* add * add
1 parent 3918217 commit 3422f72

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.changelog/3069.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_clb_target_group_instance_attachment: update function support retry
3+
```

tencentcloud/services/clb/service_tencentcloud_clb.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,8 +1515,15 @@ func (me *ClbService) ModifyTargetGroupInstancesWeight(ctx context.Context, targ
15151515
ratelimit.Check(request.GetAction())
15161516
_, err := me.client.UseClbClient().ModifyTargetGroupInstancesWeight(request)
15171517
if err != nil {
1518+
if e, ok := err.(*sdkErrors.TencentCloudSDKError); ok {
1519+
if e.GetCode() == "FailedOperation.ResourceInOperating" {
1520+
return resource.RetryableError(fmt.Errorf("ModifyTargetGroupInstancesWeight is waitting retry..."))
1521+
}
1522+
}
1523+
15181524
return tccommon.RetryError(err, tccommon.InternalError)
15191525
}
1526+
15201527
return nil
15211528
})
15221529

0 commit comments

Comments
 (0)