Update dependencies (#112)

* Update dependencies

* Remove set timeout

* Remove set sleep before wait

* Update to new signature, remove unnecessary calls

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
Henrique Santos 2023-10-27 15:48:54 +01:00 committed by GitHub
parent 70cb3d1519
commit 8f5850cdf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 144 additions and 344 deletions

View file

@ -4,7 +4,6 @@ import (
"context"
"fmt"
"strings"
"time"
"github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
@ -303,7 +302,7 @@ func (r *userResource) Delete(ctx context.Context, req resource.DeleteRequest, r
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error deleting user", fmt.Sprintf("Calling API: %v", err))
}
_, err = wait.DeleteUserWaitHandler(ctx, r.client, projectId, instanceId, userId).SetTimeout(1 * time.Minute).WaitWithContext(ctx)
_, err = wait.DeleteUserWaitHandler(ctx, r.client, projectId, instanceId, userId).WaitWithContext(ctx)
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error deleting user", fmt.Sprintf("Instance deletion waiting: %v", err))
return