Skip to content

Commit

Permalink
fix(clb): [121566528] `tencentcloud_clb_target_group_instance_attachm…
Browse files Browse the repository at this point in the history
…ent` update function support retry (#3069)

* add

* add
  • Loading branch information
SevenEarth authored Jan 9, 2025
1 parent 3918217 commit 3422f72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/3069.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_clb_target_group_instance_attachment: update function support retry
```
7 changes: 7 additions & 0 deletions tencentcloud/services/clb/service_tencentcloud_clb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1515,8 +1515,15 @@ func (me *ClbService) ModifyTargetGroupInstancesWeight(ctx context.Context, targ
ratelimit.Check(request.GetAction())
_, err := me.client.UseClbClient().ModifyTargetGroupInstancesWeight(request)
if err != nil {
if e, ok := err.(*sdkErrors.TencentCloudSDKError); ok {
if e.GetCode() == "FailedOperation.ResourceInOperating" {
return resource.RetryableError(fmt.Errorf("ModifyTargetGroupInstancesWeight is waitting retry..."))
}
}

return tccommon.RetryError(err, tccommon.InternalError)
}

return nil
})

Expand Down

0 comments on commit 3422f72

Please sign in to comment.