# srivenkateswarareddy/aws-modules-eks architecture

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

- Interactive diagram: https://gitdiagram.com/srivenkateswarareddy/aws-modules-eks
- Repository: https://github.com/srivenkateswarareddy/aws-modules-eks

## Overview

##### Main Components
- EKS Module: This represents the core of the deployment – the creation and management of the EKS cluster itself. It handles the settings for the worker nodes, number of instances, and overall cluster configuration.
- IAM Module: This module manages the IAM roles, policies, and access controls required for the EKS cluster and worker nodes.
- VPC Module: This handles all networking configurations including VPC, subnets (public and private), and associated security groups.
- CI/CD Workflows: Represented by the files in the .github/workflows directory. This component shows how automated tests and deployments are triggered, ensuring that infrastructure changes via Terraform are continuously validated and applied.

##### Component Relationships and Interactions
- The EKS module depends on outputs from the VPC module (like VPC IDs and subnet IDs) to integrate the cluster into existing networking configurations.
- The IAM module supplies roles and policies that are referenced and used by the EKS module to ensure secure interactions and resource access.
- CI/CD pipelines (via GitHub workflows) are used to trigger Terraform commands such as init, plan, and apply, which then deploy the infrastructure defined within the above modules.

##### Architectural Patterns and Design Principles
- Separation of Concerns: Each module handles its own subset of responsibilities (e.g., networking, identity management, or cluster management).
- Infrastructure as Code (IaC): Emphasize that Terraform scripts drive the deployment, which is automated by CI/CD pipelines.

##### Technologies
- Terraform (with version constraints as specified in the README).
- AWS services (specifically AWS EKS for container management, IAM for access management, and VPC for networking).
- GitHub Actions / CI/CD workflows for continuous integration and deployment.
- Variables and configuration files (such as dev.tfvars and environment-specific settings), which indicate flexibility in managing different environments.

##### Instructional Steps for the Principal Software Engineer
- VPC module to the AWS Environment, showing how it supplies network configurations (subnet IDs, VPC IDs) which the EKS module consumes.
- Optionally, add notes on where configuration management takes place—for instance, the use of environment-specific variable files (dev.tfvars) in both the IAM and VPC modules.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% CI/CD Component
    CI["GitHub Workflows"]:::cicd

    %% Terraform Modules subgraph
    subgraph "Terraform Modules"
        IAM["IAM Module"]:::module
        VPC["VPC Module"]:::module
        EKS["EKS Module"]:::module
    end

    %% External AWS Environment
    AWS["AWS Environment"]:::aws

    %% Connections from CI/CD to modules
    CI -->|"triggersTerraformapply"| IAM
    CI -->|"triggersTerraformapply"| VPC
    CI -->|"triggersTerraformapply"| EKS

    %% Module Interactions and Dependencies
    VPC -->|"VPCoutputs->EKSinputs"| EKS
    IAM -->|"IAMroles->EKScluster"| EKS

    %% Modules deploying to AWS
    IAM -->|"deploysto"| AWS
    VPC -->|"deploysto"| AWS
    EKS -->|"deployedon"| AWS

    %% Click Events
    click EKS "https://github.com/srivenkateswarareddy/aws-modules-eks/blob/main/eks/main.tf"
    click IAM "https://github.com/srivenkateswarareddy/aws-modules-eks/blob/main/iam/main.tf"
    click VPC "https://github.com/srivenkateswarareddy/aws-modules-eks/blob/main/vpc/main.tf"
    click CI "https://github.com/srivenkateswarareddy/aws-modules-eks/blob/main/.github/workflows/terraform-modules.yml"

    %% Styles
    classDef module fill:#9fdf9f,stroke:#333,stroke-width:2px;
    classDef cicd fill:#f9d57a,stroke:#333,stroke-width:2px;
    classDef aws fill:#b3d1ff,stroke:#333,stroke-width:2px;
```
