Terraform and EKS Love Story with Full Of Arguments
Tried to create an EKS cluster using Terraform inside an AWS ec2 instance but, still stuck in that state of errors and errors.
SACHIDANANDA SABAR
9/18/20252 min read


“Terraform + EKS = a love story… full of arguments ” In today's DevOps Diary - Sharing how still I'm in the fight of creating an EKS cluster using Terraform, not done yet ......
1) Terraform + EKS journey (not solved yet ). Thought it was simple → ended up fighting versions, providers & cache. Here’s what I learned so far
2) First error: Unsupported argument Terraform didn’t like my inputs: cluster_name, subnets, node_groups. Why? Wrong module version. Arguments changed between releases.
3) Quick fixes I learned: i) cluster_name → must be "string". ii) Use subnet_ids (list) not subnets. iii) node_groups (old) → replaced by eks_managed_node_groups. iv) instance_types → list, not string.
4) Next error: elastic_gpu_specifications not expected elastic_inference_accelerator not expected Translation: my EKS module wanted a newer AWS provider.
5) EKS module v20.8.5 needs aws >= 6.20.0. But my setup only had 6.13.0. So… mismatch
6) Options I saw: Downgrade the module (e.g. 19.21.0). Or upgrade AWS provider beyond 6.20.
7) I tried downgrade first: module "eks" { source = "terraform-aws-modules/eks/aws" version = "19.21.0" }
8) But Terraform was sneaky Even with 19.21.0 pinned, .terraform/modules/eks/ still had 20.x code. Errors like: resolve_conflicts not expected here kept showing up.
9) Tried cleaning cache: rm -rf .terraform .terraform.lock.hcl terraform init Still errors.
10) Next idea: manual clone. git clone --branch v19.21.0 \ https://github.com/terraform-aws-modules/terraform-aws-eks.git eks-module Then : source = "./eks-module"
11) Gotcha → if you use ./eks-module, you cannot add version = "...". I learned that after Terraform yelled at me again An argument named "cluster_name" is not expected here. Means Terraform might not even be pulling the real EKS module… could be something empty.
13) At this point my checklist Pin versions Clean caches Try registry source Try local source Still errors
14) Lesson so far: Most issues are NOT my syntax. It’s Terraform mixing wrong versions of modules & providers.
15) Cluster isn’t up yet… but I learned:
a) Always lock module & provider versions
b) Clean cache often
c) Don’t trust defaults
The debugging continues (Special thanks to ChatGpt for helping in troubleshooting the root cause, Although I've reached to that point yet.)
#Terraform #EKS #AWS #DevOps #IaC #Kubernetes #Cloud #TerraformModules #VersionMismatch #TerraformErrors #HashiCorp #Troubleshooting
By the way, it's a part of the Video-Streaming-Project I'm working on. GitHub : https://github.com/sachi3050/Netflix-demo-platform.git
Proof of Concepts as Screenshots are provided below: