Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ require (
golang.org/x/mod v0.28.0
)

replace (
github.com/stackitcloud/stackit-sdk-go/services/ske => /Users/uphoffm/GolandProjects/stackit-sdk-go/services/ske
)

require (
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
golang.org/x/telemetry v0.0.0-20250908211612-aef8a434d053 // indirect
Expand Down
19 changes: 19 additions & 0 deletions stackit/internal/services/ske/cluster/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -891,10 +891,29 @@ func (r *clusterResource) createOrUpdateCluster(ctx context.Context, diags *diag
core.LogAndAddError(ctx, diags, "Error creating/updating cluster", fmt.Sprintf("Cluster creation waiting: %v", err))
return
}

if waitResp.Status.Error != nil && waitResp.Status.Error.Message != nil && *waitResp.Status.Error.Code == ske.RUNTIMEERRORCODE_OBSERVABILITY_INSTANCE_NOT_FOUND {
core.LogAndAddWarning(ctx, diags, "Warning during creating/updating cluster", fmt.Sprintf("Cluster is in Impaired state due to an invalid observability instance id, the cluster is usable but metrics won't be forwarded: %s", *waitResp.Status.Error.Message))
}

var errMsgs []string
if waitResp.Status.Errors != nil && len(*waitResp.Status.Errors) > 0 {
for _, clusterError := range *waitResp.Status.Errors {
if clusterError.Code != nil && clusterError.Message != nil {
errMsgs = append(errMsgs, fmt.Sprintf("- [%s] %s", *clusterError.Code, *clusterError.Message))
}
}

if len(errMsgs) > 0 {
core.LogAndAddWarning(
ctx,
diags,
"Warning during creating/updating cluster",
fmt.Sprintf("Cluster creation/update encountered the following issues:\n%s", strings.Join(errMsgs, "\n")),
)
}
}

err = mapFields(ctx, waitResp, model, region)
if err != nil {
core.LogAndAddError(ctx, diags, "Error creating/updating cluster", fmt.Sprintf("Processing API payload: %v", err))
Expand Down
Loading