How vravind1/terraform-eks works
Project Type and Purpose
• The project uses Terraform scripts to create and manage an EKS cluster, configure a Virtual Private Cloud (VPC), and set up related networking components.
• The README clarifies how to initialize, plan, and apply Terraform configurations while also guiding the user to interact with the EKS cluster using tools like kubectl and aws-cli.
Analyzing the File Structure
• The top-level files are all Terraform configuration files such as:
• main.tf – likely the primary orchestration file.
• eks-cluster.tf – likely contains the configuration for provisioning the EKS cluster.
• vpc.tf – configuration for setting up the Virtual Private Cloud (VPC) used by the cluster.
• outputs.tf, variables.tf, terraform.tf, and .terraform.lock.hcl for managing inputs, outputs, and provider configurations.
• The presence of these files indicates a clear separation of concerns within the provisioning scripts (e.g., networking vs. cluster deployment).
Core Components
a. Terraform Environment:
• Terraform execution environment where the code is applied. It handles initialization (terraform init), planning (terraform plan), and applying (terraform apply) stages.
b. AWS Cloud Infrastructure:
• AWS as the cloud provider.
• A component for the VPC (from vpc.tf) that configures the networking environment.
c. EKS Cluster:
• Nodes or worker groups that will run Kubernetes workloads.
d. Auxiliary Tools:
e. State Management & Configuration Files:
• How Terraform’s state file (implied by the locking mechanism) is part of the management process, ensuring the current configuration is correctly captured.
Relationships and Interactions
• That Terraform uses configuration files (main.tf, eks-cluster.tf, vpc.tf, etc.) to control AWS resource creation.
• Dependencies between the VPC and the EKS cluster, since the cluster resides within the networking context defined by the VPC.
Architectural Patterns & Design Principles
• Infrastructure-as-Code (IaC) principles with Terraform orchestrating the complete lifecycle of cloud resources.
• Clear separation of configuration concerns (networking vs. cluster setup).