# jayshenkar07/terraform architecture

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

- Interactive diagram: https://gitdiagram.com/jayshenkar07/terraform
- Repository: https://github.com/jayshenkar07/terraform

## Overview

##### Project Components Identification
- Infrastructure Resources: Highlight the specific AWS resources being provisioned:
- EC2 Instances (under “Launch_EC2_Instance” and corresponding custom module in “Modules/ec2-instance_custom_module”)
- S3 Buckets (under “Create_S3_Bucket” and “Modules/s3_custom_module”)
- DynamoDB Tables (“DynamoDB_Table”)
- Custom Modules: Emphasize the reusable modules for EC2 and S3 (found in “Modules”) which abstract repetitive code.
- Providers Configuration: Include a component for provider configurations (found under “Providers”) that manages multiple providers and regions.
- Variables Management: Represent the variables (and conditional variables) that control dynamic behaviors (located in “Variables”).
- Remote Backends: Show the setup that manages Terraform state remotely (found under “Remote_Backends”).

##### Design Principles and Architectural Patterns
- Modularization: Emphasize that the project uses a modular design (reusable modules are in a dedicated folder) which helps in code reuse and maintainability.
- Environment Separation: With folders for variables and remote backends, indicate how different environments (or regions/providers) might be managed.
- Declarative Infrastructure as Code: Note that each Terraform configuration defines desired state for AWS resources.

##### Relevant Technologies, Frameworks, and Libraries
- Terraform, as the core technology.
- AWS as the targeted cloud provider (implied by the resource names like EC2, S3, and DynamoDB).
- Supporting Git-based storage for configurations (implied by the file tree structure).

## Diagram (Mermaid)

```mermaid
flowchart TD
    Providers["Providers Configuration"]:::provider
    Variables["Global Variables"]:::variable

    EC2["Launch_EC2_Instance"]:::resource
    S3["Create_S3_Bucket"]:::resource
    Dynamo["DynamoDB_Table"]:::resource

    subgraph "Modules"
        EC2Mod["EC2 Custom Module"]:::module
        S3Mod["S3 Custom Module"]:::module
    end

    Remote["Remote Backends"]:::backend

    Providers -->|"configures"| EC2
    Providers -->|"configures"| S3
    Providers -->|"configures"| Dynamo

    Variables -->|"supplies"| EC2
    Variables -->|"supplies"| S3
    Variables -->|"supplies"| Dynamo
    Variables -->|"supplies"| EC2Mod
    Variables -->|"supplies"| S3Mod

    EC2 -->|"calls"| EC2Mod
    S3 -->|"calls"| S3Mod

    EC2 -->|"managesState"| Remote
    S3 -->|"managesState"| Remote
    Dynamo -->|"managesState"| Remote

    click Providers "https://github.com/jayshenkar07/terraform/blob/main/04. Providers"
    click Variables "https://github.com/jayshenkar07/terraform/blob/main/05. Variables"
    click EC2 "https://github.com/jayshenkar07/terraform/blob/main/01. Launch_EC2_Instance/main.tf"
    click S3 "https://github.com/jayshenkar07/terraform/blob/main/02. Create_S3_Bucket/main.tf"
    click Dynamo "https://github.com/jayshenkar07/terraform/blob/main/03. DynamoDB_Table/main.tf"
    click EC2Mod "https://github.com/jayshenkar07/terraform/tree/main/06. Modules/ec2-instance_custom_module"
    click S3Mod "https://github.com/jayshenkar07/terraform/tree/main/06. Modules/s3_custom_module"
    click Remote "https://github.com/jayshenkar07/terraform/blob/main/07. Remote_Backends"

    classDef provider fill:#cce5ff,stroke:#004085,stroke-width:2px,color:#004085;
    classDef variable fill:#fff3cd,stroke:#856404,stroke-width:2px,color:#856404;
    classDef resource fill:#d4edda,stroke:#155724,stroke-width:2px,color:#155724;
    classDef module fill:#f8d7da,stroke:#721c24,stroke-width:2px,color:#721c24;
    classDef backend fill:#d1ecf1,stroke:#0c5460,stroke-width:2px,color:#0c5460;
```
