<p>I'm installing Argo CD using its helm chart through Terraform definition like below. The setup is simple, I create a namespace separate so it can be deleted on <code>terraform destroy</code> then I install the chart.</p>
<pre><code>resource &quot;kubernetes_namespace&quot; &quot;ns_argocd&quot; {
  metadata {
    annotations = {
      name = &quot;argocd&quot;
    }

    name = &quot;argocd&quot;
  }
}

resource &quot;helm_release&quot; &quot;argocd&quot; {
  name             = &quot;argocd&quot;
  repository       = &quot;https://argoproj.github.io/argo-helm&quot;
  chart            = &quot;argo-cd&quot;
  namespace        = kubernetes_namespace.ns_argocd.metadata.0.name
  create_namespace = false

  version    = &quot;5.13.1&quot;

  depends_on = [kubernetes_namespace.ns_argocd]
}
</code></pre>
<p>Since I am still experimenting on the setup, I have to destroy and recreate a few times and every time that I hit <code>terraform destroy</code> it times out because the pods and the namespace are stuck on <code>terminating</code> status (see below). My current fix is to manually force delete every pod and namespace via <code>kubectl delete [pod] -n argocd --force</code>.</p>
<p>Is there anything that I'm missing to pass to the values file that will prevent this behavior?</p>
<pre class="lang-bash prettyprint-override"><code>NAME              STATUS        AGE
argocd            Terminating   3h58m
default           Active        4h4m
kube-node-lease   Active        4h4m
kube-public       Active        4h4m
kube-system       Active        4h4m
</code></pre>
<pre class="lang-bash prettyprint-override"><code>NAME                                                READY   STATUS        RESTARTS   AGE
argocd-application-controller-0                     1/1     Terminating   0          3h55m
argocd-applicationset-controller-7bb6d6d68c-p52j7   1/1     Terminating   0          3h55m
argocd-dex-server-6bc5f5689c-ps6wk                  1/1     Terminating   0          3h55m
argocd-notifications-controller-57bd8dbc87-msdnw    1/1     Terminating   0          3h55m
argocd-redis-77df65946d-fhb46                       1/1     Terminating   0          3h55m
argocd-repo-server-6984b7475d-b2625                 1/1     Terminating   0          3h55m
argocd-server-548dffcdcc-nbrhc                      1/1     Terminating   0          3h55m
</code></pre>

everspader
<p>Check out this link. It highlights the issue with orphaned CRDs left by Terraform. We also need to set the finalizers to [].</p>
<p><a href="https://github.com/aws-ia/terraform-aws-eks-blueprints/issues/865" rel="nofollow noreferrer">https://github.com/aws-ia/terraform-aws-eks-blueprints/issues/865</a></p>
