fix: fix tests and lintings

This commit is contained in:
Marcel S. Henselin 2026-02-19 11:31:06 +01:00
parent 2aee47aa76
commit 6e1817c425
18 changed files with 61 additions and 37 deletions

View file

@ -7,6 +7,7 @@ import (
"math"
"net/http"
"strings"
"time"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
@ -244,6 +245,9 @@ func (r *instanceResource) Create(
}
waitResp, err := wait.CreateInstanceWaitHandler(ctx, r.client, projectId, region, instanceId).
// Sleep before wait is set because sometimes API returns 404 right after creation request
SetTimeout(90 * time.Minute).
SetSleepBeforeWait(30 * time.Second).
WaitWithContext(ctx)
if err != nil {
core.LogAndAddError(
@ -486,7 +490,10 @@ func (r *instanceResource) Update(
projectId,
region,
instanceId,
).WaitWithContext(ctx)
).
SetTimeout(45 * time.Minute).
SetSleepBeforeWait(30 * time.Second).
WaitWithContext(ctx)
if err != nil {
core.LogAndAddError(
ctx,