Skip to content

Commit

Permalink
fix(DRS): fix drs job delete (#4947)
Browse files Browse the repository at this point in the history
  • Loading branch information
houpeng80 authored Jun 3, 2024
1 parent d0a7418 commit ea64783
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions huaweicloud/services/drs/resource_huaweicloud_drs_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,9 @@ func resourceJobDelete(ctx context.Context, d *schema.ResourceData, meta interfa
if err != nil {
return diag.Errorf("error getting resource IDs: %s", err)
}
if len(resourceIDs) != 1 {
return diag.Errorf("error getting resource IDs, more than 1 resources are get by order (%s)", orderId)
}
err = common.UnsubscribePrePaidResource(d, conf, resourceIDs)
if err != nil {
return diag.Errorf("error unsubscribing DRS job: %s", err)
Expand Down

0 comments on commit ea64783

Please sign in to comment.