Skip to content

Commit

Permalink
retry read cbs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikatong committed Jan 10, 2025
1 parent 4b457d4 commit f2caaf7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tencentcloud/services/cvm/resource_tc_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ func resourceTencentCloudInstanceRead(d *schema.ResourceData, meta interface{})
err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {
disks, err := cbsService.DescribeDiskList(ctx, []*string{instance.SystemDisk.DiskId})
if err != nil {
return resource.NonRetryableError(err)
return tccommon.RetryError(err)
}

for i := range disks {
Expand Down Expand Up @@ -1045,7 +1045,7 @@ func resourceTencentCloudInstanceRead(d *schema.ResourceData, meta interface{})
err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {
disks, err := cbsService.DescribeDiskList(ctx, dataDiskIds)
if err != nil {
return resource.NonRetryableError(err)
return tccommon.RetryError(err)
}

if v, ok := d.GetOk("data_disks"); ok {
Expand Down Expand Up @@ -1092,7 +1092,7 @@ func resourceTencentCloudInstanceRead(d *schema.ResourceData, meta interface{})
err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {
disks, err := cbsService.DescribeDiskList(ctx, diskIds)
if err != nil {
return resource.NonRetryableError(err)
return tccommon.RetryError(err)
}

for i := range disks {
Expand Down Expand Up @@ -1174,7 +1174,7 @@ func resourceTencentCloudInstanceRead(d *schema.ResourceData, meta interface{})
err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {
disks, err := cbsService.DescribeDiskList(ctx, finalDiskIds)
if err != nil {
return resource.NonRetryableError(err)
return tccommon.RetryError(err)
}

for _, disk := range disks {
Expand Down Expand Up @@ -1251,7 +1251,7 @@ func resourceTencentCloudInstanceRead(d *schema.ResourceData, meta interface{})
err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError {
cbsDisks, err = cbsService.DescribeDiskList(ctx, diskIds)
if err != nil {
return resource.NonRetryableError(err)
return tccommon.RetryError(err)
}

for i := range cbsDisks {
Expand Down

0 comments on commit f2caaf7

Please sign in to comment.