Terraform Modular EKS + Istio β Part 1
VPC Module (Complete Code + Real Explanation) Before touching EKS, Istio, or routing β everything depends on one thing: π Your network If the VPC is wrong: Nodes wonβt join ALB wonβt work Pods won...

Source: DEV Community
VPC Module (Complete Code + Real Explanation) Before touching EKS, Istio, or routing β everything depends on one thing: π Your network If the VPC is wrong: Nodes wonβt join ALB wonβt work Pods wonβt get IPs Routing will fail in weird ways So in this part, Iβll walk through the entire VPC module from my setup, using the exact code β and explain what each part is doing and why it exists. π Module Files This module consists of 3 files: modules/vpc/ βββ main.tf βββ variables.tf βββ outputs.tf π variables.tf This file defines what inputs the module expects. variable "vpc_name" { description = "Name of the VPC" type = string } variable "vpc_cidr" { description = "CIDR block for VPC" type = string default = "10.0.0.0/16" } variable "availability_zones" { description = "Availability zones" type = list(string) } variable "private_subnet_cidrs" { description = "CIDR blocks for private subnets" type = list(string) } variable "public_subnet_cidrs" { description = "CIDR blocks for public subnets