Skip to content

Commit

Permalink
resource/alicloud_mongodb_instance: add retry code while deleting ins…
Browse files Browse the repository at this point in the history
…tance.
  • Loading branch information
ChenHanZhang committed Dec 25, 2024
1 parent 981e821 commit ac0027b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alicloud/resource_alicloud_mongodb_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ func resourceAliCloudMongoDBInstanceDelete(d *schema.ResourceData, meta interfac
err = resource.Retry(client.GetRetryTimeout(d.Timeout(schema.TimeoutDelete)), func() *resource.RetryError {
response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-12-01"), StringPointer("AK"), nil, request, &runtime)
if err != nil {
if NeedRetry(err) {
if NeedRetry(err) || IsExpectedErrors(err, []string{"OperationDenied.DBInstanceStatus"}) {
wait()
return resource.RetryableError(err)
}
Expand Down

0 comments on commit ac0027b

Please sign in to comment.