From a600f6fe3d04c7c3c6a7538e0b82b50d42bebcf2 Mon Sep 17 00:00:00 2001 From: Marcin Kaciuba Date: Tue, 14 Nov 2023 13:44:48 +0100 Subject: [PATCH] fix: diconnect before delete --- castai/cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/castai/cluster.go b/castai/cluster.go index 693b64aa..0d348352 100644 --- a/castai/cluster.go +++ b/castai/cluster.go @@ -68,7 +68,7 @@ func resourceCastaiClusterDelete(ctx context.Context, data *schema.ResourceData, return retry.RetryableError(fmt.Errorf("triggered cluster deletion")) } - if agentStatus == sdk.ClusterAgentStatusDisconnected { + if agentStatus == sdk.ClusterAgentStatusDisconnected || clusterStatus == sdk.ClusterStatusDeleted { return triggerDelete() }