Terraform Modular EKS + Istio — Part 2
IAM Module (IRSA, OIDC, and Why This Controls Everything) In the previous part, we built the VPC. Now we move to something that causes the most confusion in EKS setups: 👉 IAM This is not just “per...

Source: DEV Community
IAM Module (IRSA, OIDC, and Why This Controls Everything) In the previous part, we built the VPC. Now we move to something that causes the most confusion in EKS setups: 👉 IAM This is not just “permissions”. This module controls: how EKS works how nodes behave how pods access AWS services If this is wrong: ALB won’t work CSI drivers fail Pods can’t access AWS Debugging becomes painful 📂 Module Files modules/iam/ ├── main.tf ├── variables.tf └── outputs.tf 📄 variables.tf variable "cluster_name" { description = "Name of the EKS cluster" type = string } variable "oidc_provider_arn" { description = "ARN of the OIDC provider" type = string } variable "oidc_provider" { description = "OIDC provider URL" type = string } 🧠 What these inputs mean cluster_name → used to name roles oidc_provider_arn → comes from EKS module oidc_provider → used for IRSA condition matching 👉 Important: This module depends on EKS Because OIDC is created inside the EKS module. 📄 main.tf (Core IAM Logic) 1. EKS Cl