3

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 Commented Nov 20, 2022 at 14:45

1 Answer 1

2

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.