terraform-provider-kubernetes
terraform-provider-kubernetes copied to clipboard
kubernetes_ingress_v1 with AWS ALB not Deleting AWS Resources Correctly
Terraform Version, Provider Version and Kubernetes Version
Terraform version: 1.6.2
Kubernetes provider version: 2.23.0
Kubernetes version: 1.28
Affected Resource(s)
Panic Output
N/A
Steps to Reproduce
- Follow the readme instructions from here: https://github.com/cxmiller21/aws-eks-microservices#deploy-to-aws-eks (cd to
./terraform/eks) - Update TF State bucket with sandbox AWS account bucket
- Run
terraform apply - Wait for resources to be created
- Visit the ALB DNS address/confirm it was created
- Run
terraform destroy -target kubernetes_ingress_v1.argocd_ingressorterraform destroy
Expected Behavior
Running terraform destroy successfully cleans up the resources it created - an AWS ALB and security group.
Actual Behavior
Running terraform destroy removes the kubernetes_ingress_v1.argocd_ingress resource in terraform but the ALB and security group still exist.
Important Factoids
I don't believe there's anything special going on here
References
I couldn't find any
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Hello! Thank you for opening this issue @cxmiller21, could you attempt to delete the resources with just kubectl rather than our provider to see if it produces the same error? The Kubernetes Provider is only sending the Delete request to the Kubernetes Control Plane which is where the actual deletion takes place, so based on this issue the provider isn't what's causing the issue however just to be sure I do want to see what comes from deleting with kubectl instead of deleting with our provider.
Hi @BBBmau, I was able to run the kubectl delete ing ... command from the cluster and have the AWS ALB and security group delete as expected. I could be missing something on my end or in my configuration and I don't know enough about how the backend provider code looks to really say if it's provider related
Any new info's here? I'm currently facing these effect ... I create a kubernetes-dashboard ingress ... every works fine so far. (https://github.com/kubernetes/dashboard/discussions/8522) But now I do "tf destroy" and now the whole process hangs while destroying.
This happened to me as well.