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

@ -3,7 +3,6 @@ package loadbalancer
import (
"context"
"fmt"
"time"
"github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
@ -406,16 +405,11 @@ func (r *projectResource) Create(ctx context.Context, req resource.CreateRequest
return
}
wr, err := wait.EnableLoadBalancingWaitHandler(ctx, r.client, projectId).SetTimeout(15 * time.Minute).WaitWithContext(ctx)
_, err := wait.EnableLoadBalancingWaitHandler(ctx, r.client, projectId).WaitWithContext(ctx)
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error enabling load balancer functionality", fmt.Sprintf("Waiting for enablement: %v", err))
return
}
_, ok := wr.(*loadbalancer.StatusResponse)
if !ok {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error creating instance", fmt.Sprintf("Wait result conversion, got %+v", wr))
return
}
}
// Generate API request body from model