From 8d870b7e4ce3f58517312cf0b210a513a5b81156 Mon Sep 17 00:00:00 2001 From: Marcin Kaciuba Date: Tue, 14 Nov 2023 12:55:45 +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 e9201de4..f369661b 100644 --- a/castai/cluster.go +++ b/castai/cluster.go @@ -47,7 +47,7 @@ func resourceCastaiClusterDelete(ctx context.Context, data *schema.ResourceData, triggerDelete := func() *retry.RetryError { log.Printf("[INFO] Deleting cluster.") if err := sdk.CheckResponseNoContent(client.ExternalClusterAPIDeleteClusterWithResponse(ctx, clusterId)); err != nil { - return retry.NonRetryableError(err) + return retry.NonRetryableError(fmt.Errorf("cluster status %s agent status %s error: %w", clusterStatus, agentStatus, err)) } return retry.RetryableError(fmt.Errorf("triggered cluster deletion")) }