Score:2

how to generate terraform code of existing AWS EKS cluster?

lu flag

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!

SYN avatar
hk flag
SYN
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
Score:1
my flag

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

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.