1
votes

I would like to create an AWS EKS Fargate cluster with Terraform, but in the provider I only see the possibility to create a Fargate profile. Therefore I need to manage the node groups, which is something that I don't want to do. In the end, I would like the same behaviour of this eksctl command:

eksctl create cluster --name my-cluster --version 1.14 --fargate
2
Good to see someone else on the same boat as myself! This is what I was able to look at so far: learn.hashicorp.com/terraform/kubernetes/provision-eks-cluster. It's a nice start, but I always get confused when it comes to roles. Hope this helps!chaws

2 Answers

0
votes

I've managed to get an AWS EKS cluster working fully with Fargate and managed by Terraform. Here is the eks.tf file that does it:

https://github.com/Linaro/qa-reports.linaro.org/blob/9dfa8673259971c78311f5e9ec1cd1ab05a6e75e/terraform/shared/eks.tf

I gotta say that this took me a while to figure out and terraform scripts got a bit too scary, but I think this might help you out.

0
votes

use this Terraform module: https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest

Currently, I have many production EKS clusters running on it with node-groups as well as with Fargate.

Regards