# sumitverma77/infra-pilot-iac architecture

> Architecture diagram of the GitHub repository sumitverma77/infra-pilot-iac, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sumitverma77/infra-pilot-iac
- Repository: https://github.com/sumitverma77/infra-pilot-iac

## Overview

InfraPilot is an infrastructure-as-code workspace for provisioning AWS environments with Terraform, with GitHub Actions automating infrastructure changes. The principal workflow is a repository change triggering Terraform validation and planning, followed by an apply that provisions the network, security, load balancing, and ECS baseline. The README also documents an application-repository deployment flow that updates ECS independently. Source excerpts were unavailable, so relationships below are limited to those explicitly described in the README; the Terraform components are mapped from the file tree.

Main entry points: [`.github/workflows/terraform-ci-cd.yml`](https://github.com/sumitverma77/infra-pilot-iac/blob/main/.github/workflows/terraform-ci-cd.yml) (Terraform Plan and Apply), [`terraform/ecs.tf`](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/ecs.tf) (Spring Boot Container), [`terraform/alb.tf`](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/alb.tf) (Load Balancer), [`terraform/main.tf`](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/main.tf) (Backend Configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_automation["Infrastructure Automation"]
  node_terraform_workflow["Terraform Workflow"]
  node_terraform_plan["Terraform Plan and Apply"]
end

subgraph group_configuration["Terraform Configuration"]
  node_backend_config["Backend Configuration<br/>[main.tf]"]
  node_ecs_service_module["Reusable ECS Service<br/>[main.tf]"]
  node_iam["IAM Configuration<br/>[iam.tf]"]
  node_oidc_module["GitHub OIDC Role<br/>[main.tf]"]
end

subgraph group_aws["AWS Environment"]
  node_vpc["VPC and Subnets<br/>[vpc.tf]"]
  node_firewalls["Security Groups<br/>[security-groups.tf]"]
  node_load_balancer["Load Balancer<br/>[alb.tf]"]
  node_ecs["ECS Fargate<br/>[ecs.tf]"]
  node_ecr["Container Registry<br/>[ecr.tf]"]
  node_state_bucket[("Terraform State Bucket")]
  node_state_lock[("State Lock Table")]
  node_cloudwatch[("CloudWatch Logs")]
  node_app_container["Spring Boot Container<br/>[ecs.tf]"]
end

subgraph group_application["Application Deployment"]
  node_app_pipeline["Application CI/CD"]
end

node_iac_repo(("IaC Repository"))
node_app_repo(("Application Repository"))

node_iac_repo -->|"triggers"| node_terraform_workflow
node_terraform_workflow -->|"runs"| node_terraform_plan
node_terraform_plan -->|"uses backend"| node_backend_config
node_terraform_plan -->|"loads state"| node_state_bucket
node_terraform_plan -->|"provisions"| node_vpc
node_terraform_plan -->|"provisions"| node_firewalls
node_terraform_plan -->|"provisions"| node_load_balancer
node_terraform_plan -->|"provisions baseline"| node_ecs
node_terraform_plan -->|"provisions"| node_iam
node_terraform_plan -->|"provisions role"| node_oidc_module
node_ecs -->|"runs"| node_app_container
node_load_balancer -->|"routes traffic"| node_app_container
node_app_repo -->|"triggers"| node_app_pipeline
node_app_pipeline -->|"pushes image"| node_ecr
node_app_pipeline -->|"updates task definition"| node_ecs
node_app_pipeline -->|"deploys image"| node_app_container
node_app_container -.->|"writes logs"| node_cloudwatch

click node_terraform_workflow "https://github.com/sumitverma77/infra-pilot-iac/blob/main/.github/workflows/terraform-ci-cd.yml"
click node_terraform_plan "https://github.com/sumitverma77/infra-pilot-iac/blob/main/.github/workflows/terraform-ci-cd.yml"
click node_backend_config "https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/main.tf"
click node_vpc "https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/vpc.tf"
click node_firewalls "https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/security-groups.tf"
click node_load_balancer "https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/alb.tf"
click node_ecs "https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/ecs.tf"
click node_ecs_service_module "https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/modules/ecs-service/main.tf"
click node_ecr "https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/ecr.tf"
click node_iam "https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/iam.tf"
click node_oidc_module "https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/modules/github-oidc-role/main.tf"
click node_app_container "https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/ecs.tf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_terraform_workflow,node_terraform_plan toneBlue
class node_backend_config,node_ecs_service_module,node_iam,node_oidc_module toneAmber
class node_vpc,node_firewalls,node_load_balancer,node_ecs,node_ecr,node_state_bucket,node_state_lock,node_cloudwatch,node_app_container toneMint
class node_app_pipeline toneRose
class node_iac_repo,node_app_repo toneIndigo
```

## Components

### Infrastructure Automation

- [Terraform Workflow](https://github.com/sumitverma77/infra-pilot-iac/blob/main/.github/workflows/terraform-ci-cd.yml): `.github/workflows/terraform-ci-cd.yml`
- [Terraform Plan and Apply](https://github.com/sumitverma77/infra-pilot-iac/blob/main/.github/workflows/terraform-ci-cd.yml): `.github/workflows/terraform-ci-cd.yml`

### Terraform Configuration

- [Backend Configuration](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/main.tf): `terraform/main.tf`
- [Reusable ECS Service](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/modules/ecs-service/main.tf): `terraform/modules/ecs-service/main.tf`
- [IAM Configuration](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/iam.tf): `terraform/iam.tf`
- [GitHub OIDC Role](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/modules/github-oidc-role/main.tf): `terraform/modules/github-oidc-role/main.tf`

### AWS Environment

- [VPC and Subnets](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/vpc.tf): `terraform/vpc.tf`
- [Security Groups](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/security-groups.tf): `terraform/security-groups.tf`
- [Load Balancer](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/alb.tf): `terraform/alb.tf`
- [ECS Fargate](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/ecs.tf): `terraform/ecs.tf`
- [Container Registry](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/ecr.tf): `terraform/ecr.tf`
- **Terraform State Bucket**
- **State Lock Table**
- **CloudWatch Logs**
- [Spring Boot Container](https://github.com/sumitverma77/infra-pilot-iac/blob/main/terraform/ecs.tf): `terraform/ecs.tf`

### Application Deployment

- **Application CI/CD**

### Other components

- **IaC Repository**
- **Application Repository**

## Connections

- IaC Repository → Terraform Workflow: triggers (evidence: `README.md`)
- Terraform Workflow → Terraform Plan and Apply: runs (evidence: `README.md`)
- Terraform Plan and Apply → Backend Configuration: uses backend (evidence: `README.md`)
- Terraform Plan and Apply → Terraform State Bucket: loads state (evidence: `README.md`)
- Terraform Plan and Apply → VPC and Subnets: provisions (evidence: `README.md`)
- Terraform Plan and Apply → Security Groups: provisions (evidence: `README.md`)
- Terraform Plan and Apply → Load Balancer: provisions (evidence: `README.md`)
- Terraform Plan and Apply → ECS Fargate: provisions baseline (evidence: `README.md`)
- Terraform Plan and Apply → IAM Configuration: provisions (evidence: `README.md`)
- Terraform Plan and Apply → GitHub OIDC Role: provisions role (evidence: `README.md`)
- ECS Fargate → Spring Boot Container: runs (evidence: `README.md`)
- Load Balancer → Spring Boot Container: routes traffic (evidence: `README.md`)
- Application Repository → Application CI/CD: triggers (evidence: `README.md`)
- Application CI/CD → Container Registry: pushes image (evidence: `README.md`)
- Application CI/CD → ECS Fargate: updates task definition (evidence: `README.md`)
- Application CI/CD → Spring Boot Container: deploys image (evidence: `README.md`)
- Spring Boot Container → CloudWatch Logs: writes logs (evidence: `README.md`)
