I am working on AWS EKS with Jenkins terraform, I am facing an error while destroying the resources it seems that Jenkins pipeline destroys the EKS cluster first so that the node group makes an error in the pipeline, EKS node group should be deleted first then the cluster must be deleted. If I try to run terraform script locally it is working fine.
Error: error deleting EKS Cluster (EKS_CLUSTER): ResourceInUseException: Cluster has nodegroups attached
I am expecting someone is facing the same issue and give an answer which resolves my problem