# anthonymatta/infrastructure architecture

> Architecture diagram of the GitHub repository anthonymatta/infrastructure, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anthonymatta/infrastructure
- Repository: https://github.com/anthonymatta/infrastructure

## Overview

##### Main Components

a) Setup Layer:
- S3 Bucket for Terraform State (highlight this as the foundation)

b) Core Infrastructure Layer:
- Networking Module (VPC, Subnets)
- Security Components

c) Compute Layer:
- EKS Cluster
- ECS Cluster
- Jump Server

d) CI/CD Layer:
- Pipeline Components

##### Specific Component Relationships

a) State Management:
- S3 bucket connection to all Terraform modules

b) Networking:
- Public and private subnets
- Routing relationships

c) Compute:
- EKS and ECS clusters to private subnets
- Jump Server in public subnet
- Security group relationships

d) Management:
- CloudWatch integration with ECS
- Session Manager connection to Jump Server

##### Important Elements

a) AWS Region Boundary:
- Region (us-east-1) boundary
- Availability zone distribution

b) Module Dependencies:
- Data flow between components

c) Access Patterns:
- How external users connect via Jump Server
- Kubectl access path to EKS

##### Technical Details to Highlight

a) Security:
- IAM roles and permissions
- Security group relationships
- Network ACLs

b) Monitoring:
- CloudWatch integration
- Dashboard connections

- VPC
- EKS
- ECS
- S3
- Jump Server
- CloudWatch

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "AWS Region us-east-1"
        subgraph "State Management Layer"
            S3["S3 Terraform State"]:::storage
        end

        subgraph "Core Infrastructure Layer"
            VPC["VPC Network"]:::network
            PublicSubnets["Public Subnets"]:::network
            PrivateSubnets["Private Subnets"]:::network
            NACL["Network ACLs"]:::security
            IGW["Internet Gateway"]:::network
        end

        subgraph "Compute Layer"
            EKS["EKS Cluster"]:::compute
            ECS["ECS Cluster"]:::compute
            JumpServer["Jump Server"]:::security
            CW["CloudWatch"]:::monitoring
            Dashboard["ECS Dashboard"]:::monitoring
        end

        subgraph "CI/CD Layer"
            Pipeline["Pipeline Components"]:::pipeline
        end

        %% Relationships
        VPC --> PublicSubnets
        VPC --> PrivateSubnets
        PublicSubnets --> IGW
        PrivateSubnets --> NACL
        PublicSubnets --> JumpServer
        PrivateSubnets --> EKS
        PrivateSubnets --> ECS
        ECS --> CW
        CW --> Dashboard
        JumpServer -.-> EKS
        Pipeline --> ECS
        Pipeline --> EKS
        S3 -.-> VPC
        S3 -.-> EKS
        S3 -.-> ECS
        S3 -.-> Pipeline
    end

    %% Click Events
    click S3 "https://github.com/Anthonymatta/infrastructure/blob/master/setup/main.tf"
    click VPC "https://github.com/Anthonymatta/infrastructure/blob/master/module/networking/main.tf"
    click EKS "https://github.com/Anthonymatta/infrastructure/tree/master/module/eks"
    click ECS "https://github.com/Anthonymatta/infrastructure/tree/master/module/ecs"
    click CW "https://github.com/Anthonymatta/infrastructure/blob/master/module/ecs/cloudwatch.tf"
    click Dashboard "https://github.com/Anthonymatta/infrastructure/blob/master/module/ecs/resources/dashboard_body.json"
    click JumpServer "https://github.com/Anthonymatta/infrastructure/tree/master/module/jumpserver"
    click Pipeline "https://github.com/Anthonymatta/infrastructure/blob/master/module/pipeline/main.tf"

    %% Styles
    classDef network fill:#1E90FF,stroke:#333,stroke-width:2px
    classDef compute fill:#90EE90,stroke:#333,stroke-width:2px
    classDef security fill:#FFD700,stroke:#333,stroke-width:2px
    classDef pipeline fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef storage fill:#A9A9A9,stroke:#333,stroke-width:2px
    classDef monitoring fill:#20B2AA,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        N["Networking"]:::network
        C["Compute"]:::compute
        Sec["Security"]:::security
        P["Pipeline"]:::pipeline
        St["Storage"]:::storage
        M["Monitoring"]:::monitoring
    end
```
