2

I created EKS cluster on my AWS account, finished all necessary configurations, the environment is working as expected. Now I would like to generate terraform code to have a possibility to create another EKS by request from app. Is it possible to generate terraform code from existing EKS cluster, did anyone have experience of that?... thanks in advance!

1
  • I don't think this is possible. You'ld have to write that code. Eventually, you might be able to import existing objects from your current cluster, into your terraform state, and keep managing them from terraform. But code won't write itself, you'ld have to look into this
    – SYN
    Commented Nov 20, 2022 at 14:45

1 Answer 1

1

You can do it with terraform import.

This also works for EKS clusters.

EKS Clusters can be imported using the name, e.g.,

$ terraform import aws_eks_cluster.my_cluster my_cluster

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .