# sairam9479/project_tf architecture

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

- Interactive diagram: https://gitdiagram.com/sairam9479/project_tf
- Repository: https://github.com/sairam9479/project_tf

## Overview

##### Project type and purpose
- This is an Infrastructure-as-Code (IaC) project using Terraform to provision and manage AWS resources.
- The presence of files like asg3.tf, elb_asg.tf, r53.tf, instance.tf shows the project’s goal is to spin up EC2 instances, configure an Auto Scaling Group (ASG) behind an Elastic Load Balancer (ELB), and register DNS records in Route 53. The Jenkinsfile indicates a CI/CD pipeline to apply Terraform changes. The nikhil_website folder likely holds the website content deployed to those EC2 instances (or possibly to S3).

##### File structure
- Top‐level files:
- Jenkinsfile – defines build/test/apply stages for Terraform via Jenkins
- *.tf files – each configures a slice of the AWS infrastructure (ASG, ELB, instances, DNS)
- example.1, example.2 – sample Terraform invocations or variable files
- nikhil_website/ – static assets or application code to be deployed on the instances
- No distinct “modules” directory, so this is a flat Terraform codebase.
- r53.tf – Route 53 DNS record, tying a domain name to the load balancer.
- asg_* and elb_* – configurations for Auto Scaling Groups and Elastic Load Balancers.

##### Insights from README
- We infer AWS is the cloud provider (via Terraform AWS provider).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Layer 1: CI/CD
    subgraph "Layer 1: CI/CD"
        Jenkins["Jenkins (CI/CD)"]:::cicd
    end

    %% Layer 2: IaC
    subgraph "Layer 2: Infrastructure as Code"
        tf_repo["Terraform Configurations"]:::iac
        asg3_tf["asg3.tf"]:::iac
        asg_elb_tf["asg_elb.tf"]:::iac
        asg_final_tf["asg_final.tf"]:::iac
        elb_asg_tf["elb_asg.tf"]:::iac
        elb_asgf_tf["elb_asgf.tf"]:::iac
        instance_tf["instance.tf"]:::iac
        instance_terraform_tf["instance_terraform.tf"]:::iac
        r53_tf["r53.tf"]:::dns
        example1["example.1"]:::iac
        example2["example.2"]:::iac
        nikhil_ws["nikhil_website/"]:::website
    end

    %% Layer 3: Terraform AWS Provider
    subgraph "Layer 3: Terraform AWS Provider"
        aws_provider["Terraform AWS Provider"]:::control
    end

    %% Layer 4: AWS Resources
    subgraph "Layer 4: AWS Resources"
        route53["Route 53 DNS"]:::dns
        elb["Elastic Load Balancer"]:::aws
        asg["Auto Scaling Group"]:::aws
        ec2["EC2 Instances"]:::aws
    end

    %% Layer 5: User / Browser
    subgraph "Layer 5: End User Interaction"
        user["User / Browser"]:::external
    end

    %% Connections
    Jenkins -->|checkout & terraform apply| tf_repo
    tf_repo -->|terraform apply| aws_provider
    aws_provider -->|API calls| elb
    aws_provider -->|API calls| asg
    aws_provider -->|API calls| ec2
    aws_provider -->|API calls| route53

    user -->|DNS lookup| route53
    route53 -->|resolves to| elb
    elb -->|forwards requests to| asg
    asg -->|scales and manages| ec2
    ec2 -->|serves content from| nikhil_ws

    %% IaC file associations
    tf_repo --> asg3_tf
    tf_repo --> asg_elb_tf
    tf_repo --> asg_final_tf
    tf_repo --> elb_asg_tf
    tf_repo --> elb_asgf_tf
    tf_repo --> instance_tf
    tf_repo --> instance_terraform_tf
    tf_repo --> r53_tf
    tf_repo --> example1
    tf_repo --> example2
    ec2 --> nikhil_ws

    %% Click Events
    click Jenkins "https://github.com/sairam9479/project_tf/tree/master/Jenkinsfile"
    click asg3_tf "https://github.com/sairam9479/project_tf/blob/master/asg3.tf"
    click asg_elb_tf "https://github.com/sairam9479/project_tf/blob/master/asg_elb.tf"
    click asg_final_tf "https://github.com/sairam9479/project_tf/blob/master/asg_final.tf"
    click elb_asg_tf "https://github.com/sairam9479/project_tf/blob/master/elb_asg.tf"
    click elb_asgf_tf "https://github.com/sairam9479/project_tf/blob/master/elb_asgf.tf"
    click instance_tf "https://github.com/sairam9479/project_tf/blob/master/instance.tf"
    click instance_terraform_tf "https://github.com/sairam9479/project_tf/blob/master/instance_terraform.tf"
    click r53_tf "https://github.com/sairam9479/project_tf/blob/master/r53.tf"
    click example1 "https://github.com/sairam9479/project_tf/blob/master/example.1"
    click example2 "https://github.com/sairam9479/project_tf/blob/master/example.2"
    click nikhil_ws "https://github.com/sairam9479/project_tf/tree/master/nikhil_website/"

    %% Styles
    classDef cicd fill:#a2fca0,stroke:#333,stroke-width:1px;
    classDef iac fill:#fff3a0,stroke:#333,stroke-width:1px;
    classDef control fill:#ffe38e,stroke:#333,stroke-width:1px;
    classDef aws fill:#f9c784,stroke:#333,stroke-width:1px;
    classDef dns fill:#d3b5ff,stroke:#333,stroke-width:1px;
    classDef website fill:#a0e7ff,stroke:#333,stroke-width:1px;
    classDef external fill:#cce5ff,stroke:#333,stroke-width:1px;
```
