diff --git a/docs/resources/ske_cluster.md b/docs/resources/ske_cluster.md index 8e2b44e1..4590d13b 100644 --- a/docs/resources/ske_cluster.md +++ b/docs/resources/ske_cluster.md @@ -4,12 +4,15 @@ page_title: "stackit_ske_cluster Resource - stackit" subcategory: "" description: |- SKE Cluster Resource schema. Must have a region specified in the provider configuration. + -> When updating node_pools of a stackit_ske_cluster, the Terraform plan might appear incorrect as it matches the node pools by index rather than by name. However, the SKE API correctly identifies node pools by name and applies the intended changes. Please review your changes carefully to ensure the correct configuration will be applied. --- # stackit_ske_cluster (Resource) SKE Cluster Resource schema. Must have a `region` specified in the provider configuration. +-> When updating `node_pools` of a `stackit_ske_cluster`, the Terraform plan might appear incorrect as it matches the node pools by index rather than by name. However, the SKE API correctly identifies node pools by name and applies the intended changes. Please review your changes carefully to ensure the correct configuration will be applied. + ## Example Usage ```terraform diff --git a/stackit/internal/services/ske/cluster/resource.go b/stackit/internal/services/ske/cluster/resource.go index 393aeac4..05c8cb74 100644 --- a/stackit/internal/services/ske/cluster/resource.go +++ b/stackit/internal/services/ske/cluster/resource.go @@ -260,8 +260,16 @@ func (r *clusterResource) Configure(ctx context.Context, req resource.ConfigureR // Schema defines the schema for the resource. func (r *clusterResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { + descriptions := map[string]string{ + "main": "SKE Cluster Resource schema. Must have a `region` specified in the provider configuration.", + "node_pools_plan_note": "When updating `node_pools` of a `stackit_ske_cluster`, the Terraform plan might appear incorrect as it matches the node pools by index rather than by name. " + + "However, the SKE API correctly identifies node pools by name and applies the intended changes. Please review your changes carefully to ensure the correct configuration will be applied.", + } + resp.Schema = schema.Schema{ - Description: "SKE Cluster Resource schema. Must have a `region` specified in the provider configuration.", + Description: fmt.Sprintf("%s\n%s", descriptions["main"], descriptions["node_pools_plan_note"]), + // Callout block: https://developer.hashicorp.com/terraform/registry/providers/docs#callouts + MarkdownDescription: fmt.Sprintf("%s\n\n-> %s", descriptions["main"], descriptions["node_pools_plan_note"]), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Terraform's internal resource ID. It is structured as \"`project_id`,`name`\".",