Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to Terraform #181

Closed
mikemorris opened this issue Sep 4, 2018 · 7 comments
Closed

Export to Terraform #181

mikemorris opened this issue Sep 4, 2018 · 7 comments
Labels

Comments

@mikemorris
Copy link

It would be great to offer an option to export a cluster configuration to be managed in Terraform, similar to the --target=terraform functionality in kops.

Breaking this out from initial discussion in #132 (comment)

/cc @richardcase @errordeveloper

@errordeveloper
Copy link
Contributor

errordeveloper commented Sep 4, 2018

@mikemorris thanks!

There are a couple of ways this could be achieved, but I'd like to understand the use-cases better.

Short term, the easiest way would be to use CloudFormation+Terraform, i.e. aws_cloudformation_stack. I'd be somewhat more involved, if we wanted to do something similar to what kops does.
However, either way, if you need resource parameters to be passed in via Terraform, it'd would be a big change that I'd rather avoid. I suppose kops doesn't parametrise it's Terraform config, or does it?

However, I would like to make it clear, that long term, the plan is provide to Cluster API support (#19 & #20), which essentially means that instead of terraform apply you'd be able to use eksctl apply or kubectl apply, and instead of HCL config, you'd be looking at Kubernetes API objects essentially.

@TigerC10
Copy link

There are a couple of ways this could be achieved, but I'd like to understand the use-cases better.

For one, I think that eksctl is a great starting point for clusters with a lot of configurable options (like installing the WeaveNet cni). For multi-cloud provider setups, terraform is fantastic - so if eksctl could output terraform scripts to be included in a multi-cloud provider project I think we get the best of both worlds.

@errordeveloper
Copy link
Contributor

@TigerC10 thank you, this is quite helpful. Are there any other use-case?

@mikemorris
Copy link
Author

My use-case is similar, although our infra is primarily on AWS - eksctl is a great quick setup tool, but we try to follow the "configuration as code" approach, using Terraform to manage all our infrastructure and tracking changes through a git repo (hopefully getting to a "GitOps" flow where changes are deployed by commiting and merging code eventually), would be great to at least be able to output the initial cluster config as Terraform files.

@bingochen87
Copy link

Looking eksctl to terraform config file

@Jonathan-7
Copy link

there's this project also written in go that supports exporting some AWS TF resources, but not EKS yet unfortunately.
https://github.com/GoogleCloudPlatform/terraformer

@errordeveloper
Copy link
Contributor

Closing in favour of #1094.

torredil pushed a commit to torredil/eksctl that referenced this issue May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants