# kennedyuc/eks-terraform-module architecture

> Architecture diagram of the GitHub repository kennedyuc/eks-terraform-module, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kennedyuc/eks-terraform-module
- Repository: https://github.com/kennedyuc/eks-terraform-module

## Overview

This project is a Terraform module focused on provisioning an Amazon EKS (Elastic Kubernetes Service) environment. The file tree indicates that the module is divided into several key components—with one file each dedicated to defining the EKS cluster (eks_cluster.tf), the VPC/networking aspects (eks_network.tf), and the node group configurations (eks_node.tf), along with a variables file (variables.tf) for parameterization. The README confirms that this is an "EKS Terraform Module," meaning that its main purpose is to enable users to easily provision and manage an EKS cluster with the correct networking and node configurations using Terraform.

- EKS Cluster Component: Represented by the eks_cluster.tf file. This part of the architecture defines the control plane of the Kubernetes cluster.
- Networking Component: Represented by the eks_network.tf file. This sets up the VPC, subnets, and any associated networking resources (e.g., routing tables, security groups) necessary for the cluster to operate.
- Node/Worker Nodes Component: Represented by the eks_node.tf file. This configures the worker nodes that run Kubernetes workloads.
- Configuration/Variables Component: Represented by the variables.tf file, indicating parameterization and customization points for the module.

##### Relationships and Interactions
- That the module leverages these resources collectively, with the EKS Cluster tying networking and compute (nodes) together.

##### Architectural Patterns and Design Principles
- Infrastructure as Code (IaC): The entire architecture is codified in Terraform files, emphasizing modularity and reusability.
- Component Separation: The design cleanly separates concerns into networking, cluster control, and node configuration, which is a standard best practice when designing complex cloud infrastructures.
- Declarative Configuration: This indicates that the desired state (as defined by these resources) is eventually reached through Terraform's planning and application cycles.

##### Relevant Technologies and Tools
- Terraform: As the core tool used for describing and provisioning the infrastructure.
- AWS EKS: Being the core service that is being configured.
- Underlying AWS resources such as VPCs, subnets, security groups, and EC2 instances (for nodes).

##### Detail the Elements to be Included
- A block for the Networking component showing VPC, subnets, and related resources.
- A block for the EKS Cluster showing the control plane (and any required integrations with IAM roles, security groups, etc.).
- A block for the Node Groups, illustrating how worker nodes are provisioned and attached to the cluster.
- Annotations on any important settings (such as scaling configurations or security settings if applicable).

## Diagram (Mermaid)

```mermaid
flowchart TD
    v("Module Variables/Configuration"):::config
    subgraph "Provisioning"
        direction TB
        n1("VPC/Networking"):::network
        n2("EKS Cluster"):::cluster
        n3("Worker Node Group"):::node
    end

    v -->|"configures"| n1
    v -->|"configures"| n2
    v -->|"configures"| n3
    n1 -->|"enables"| n2
    n2 -->|"activates"| n3

    click v "https://github.com/kennedyuc/eks-terraform-module/blob/main/variables.tf"
    click n1 "https://github.com/kennedyuc/eks-terraform-module/blob/main/eks_network.tf"
    click n2 "https://github.com/kennedyuc/eks-terraform-module/blob/main/eks_cluster.tf"
    click n3 "https://github.com/kennedyuc/eks-terraform-module/blob/main/eks_node.tf"

    classDef config fill:#FFD700,stroke:#333,stroke-width:2px
    classDef network fill:#87CEFA,stroke:#333,stroke-width:2px
    classDef cluster fill:#90EE90,stroke:#333,stroke-width:2px
    classDef node fill:#FFA500,stroke:#333,stroke-width:2px
```
