I have successfully created all the resources, including the EKS cluster. However, when I try to add the certificate.tf and ingress.tf files, which involve the kubernetes_manifest resource,
Hi @NChittimalla, this is a known issue with initialising managed Kubernetes clusters. The official documentation recommends splitting the two steps (creating the cluster, and managing it) into two separate Terraform configuration with independent apply steps: Terraform Registry
The other option is to use the -target command line argument to selectively apply the AWS resources first. Then following up with a full plan to create the Kubernetes resources once the cluster definitely exists.
Unfortunately this is a difficult problem with the Kubernetes provider, since we cannot even plan changes to the Kubernetes provider before it exists there isn’t a way within Terraform currently to handle this automatically.
The upcoming Terraform Stacks feature will include capabilities for handling this automatically: Terraform stacks, explained