diff --git a/internal/resource/cluster.go b/internal/resource/cluster.go index 06a9404..67ec3be 100644 --- a/internal/resource/cluster.go +++ b/internal/resource/cluster.go @@ -153,7 +153,7 @@ func (r *clusterResource) Delete(ctx context.Context, req resource.DeleteRequest if err = wait.PollWithContext(ctx, 10*time.Second, 10*time.Minute, func(ctx context.Context) (bool, error) { response, err := r.client.GetCluster(ctx, data.Id.ValueStringPointer()) - if client.IsNotFound(err) || response.Cluster == nil { + if client.IsNotFound(err) || response == nil || response.Cluster == nil { return true, nil }