From 8be6b6fc8ea019bd02efccbc47f02189c160a75b Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Thu, 23 Jul 2026 14:43:00 +0000 Subject: [PATCH] Clarify cluster Delete comment: terminates, does not remove Reworded both Clusters.Delete call sites in cluster.go to state that Delete terminates the cluster and that permanent removal is a separate API, so the next reader doesn't misread it as removing the cluster. Co-authored-by: Isaac --- bundle/direct/dresources/cluster.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundle/direct/dresources/cluster.go b/bundle/direct/dresources/cluster.go index 6ded283c9f9..20e92adfcbe 100644 --- a/bundle/direct/dresources/cluster.go +++ b/bundle/direct/dresources/cluster.go @@ -197,7 +197,7 @@ func (r *ResourceCluster) DoUpdate(ctx context.Context, id string, config *Clust return nil, err } else if !desiredStarted && alreadyRunning { // lifecycle.started=false: fire Delete; WaitAfterUpdate polls for TERMINATED. - // Delete does not remove the cluster, it just sets the state to TERMINATED. + // Note: Delete terminates the cluster; permanent removal is a separate API (permanent-delete). _, err := r.client.Clusters.Delete(ctx, compute.DeleteCluster{ClusterId: id}) return nil, err } @@ -231,6 +231,7 @@ func (r *ResourceCluster) WaitAfterCreate(ctx context.Context, id string, config if config.Lifecycle != nil && config.Lifecycle.Started != nil && !*config.Lifecycle.Started { // started=false: terminate the cluster after it reaches RUNNING. + // Note: Delete terminates the cluster; permanent removal is a separate API (permanent-delete). deleteWaiter, err := r.client.Clusters.Delete(ctx, compute.DeleteCluster{ClusterId: id}) if err != nil { return nil, err