Skip to content

Commit

Permalink
Sandbox allocation unit return error when resource does not exist in …
Browse files Browse the repository at this point in the history
…Update method (#50)
  • Loading branch information
vydrazde authored Oct 15, 2023
1 parent 0115173 commit d4dd5a2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internal/provider/sandbox_allocation_unit_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,6 @@ func (r *sandboxAllocationUnitResource) Update(ctx context.Context, req resource
}

allocationUnit, err := r.client.GetSandboxAllocationUnit(id.ValueInt64())
if _, ok := err.(*KYPOClient.ErrNotFound); ok {
resp.State.RemoveResource(ctx)
return
}

if err != nil {
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to read sandbox allocation unit, got error: %s", err))
return
Expand Down

0 comments on commit d4dd5a2

Please sign in to comment.