Skip to content
Merged
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
3 changes: 2 additions & 1 deletion bundle/direct/dresources/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down
Loading