fix: fix linter errors
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 17s
CI Workflow / Prepare GO cache (pull_request) Successful in 2m10s
CI Workflow / CI run build and linting (pull_request) Successful in 7m10s
CI Workflow / Code coverage report (pull_request) Successful in 4s
CI Workflow / CI run tests (pull_request) Failing after 9m13s
CI Workflow / Test readiness for publishing provider (pull_request) Successful in 16m53s
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 17s
CI Workflow / Prepare GO cache (pull_request) Successful in 2m10s
CI Workflow / CI run build and linting (pull_request) Successful in 7m10s
CI Workflow / Code coverage report (pull_request) Successful in 4s
CI Workflow / CI run tests (pull_request) Failing after 9m13s
CI Workflow / Test readiness for publishing provider (pull_request) Successful in 16m53s
This commit is contained in:
parent
ab9ff41b24
commit
c8ea125bac
45 changed files with 1266 additions and 139 deletions
|
|
@ -65,7 +65,7 @@ func getDatabase(
|
|||
}
|
||||
|
||||
// If the API returns no databases, we have reached the end of the list.
|
||||
if res.Databases == nil || len(res.Databases) == 0 {
|
||||
if len(res.Databases) == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/stackitcloud/stackit-sdk-go/core/utils"
|
||||
|
||||
postgresflexalpha "github.com/stackitcloud/stackit-sdk-go/services/postgresflex/v3alpha1api"
|
||||
|
||||
datasource "tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/database/datasources_gen"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -397,14 +397,14 @@ func (r *databaseResource) Update(
|
|||
core.LogAndAddError(ctx, &resp.Diagnostics, "error updating database", "databaseID out of bounds for int32")
|
||||
return
|
||||
}
|
||||
databaseId32 := int32(databaseId)
|
||||
databaseID32 := int32(databaseId) //nolint:gosec // TODO
|
||||
// Update existing database
|
||||
err := r.client.DefaultAPI.UpdateDatabasePartiallyRequest(
|
||||
ctx,
|
||||
projectId,
|
||||
region,
|
||||
instanceId,
|
||||
databaseId32,
|
||||
databaseID32,
|
||||
).UpdateDatabasePartiallyRequestPayload(payload).Execute()
|
||||
if err != nil {
|
||||
core.LogAndAddError(ctx, &resp.Diagnostics, "error updating database", err.Error())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue