# divsh54321/task-tracker-infra architecture

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

- Interactive diagram: https://gitdiagram.com/divsh54321/task-tracker-infra
- Repository: https://github.com/divsh54321/task-tracker-infra

## Overview

This repository defines AWS infrastructure for hosting the Task Tracker API, rather than implementing the API itself. The user runs Terraform to provision a security group and an EC2 instance; Terraform looks up an Ubuntu AMI, configures the AWS provider for the target region, and reports the instance’s public IP. The README documents local Terraform state and the AWS resources, but source excerpts were not available, so relationships below are limited to those documented there.

Main entry points: [`main.tf`](https://github.com/divsh54321/task-tracker-infra/blob/main/main.tf) (EC2 instance), [`security_group.tf`](https://github.com/divsh54321/task-tracker-infra/blob/main/security_group.tf) (Security group), [`provider.tf`](https://github.com/divsh54321/task-tracker-infra/blob/main/provider.tf) (AWS provider settings), [`.gitignore`](https://github.com/divsh54321/task-tracker-infra/blob/main/.gitignore) (Local Terraform state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Terraform configuration"]
  node_terraform["Terraform CLI"]
  node_aws_provider["AWS provider settings<br/>[provider.tf]"]
  node_ami_lookup["Ubuntu AMI lookup<br/>[main.tf]"]
  node_public_ip["Public IP output<br/>[main.tf]"]
end

subgraph group_provisioned["AWS infrastructure"]
  node_security_group["Security group<br/>[security_group.tf]"]
  node_ec2_instance["EC2 instance<br/>[main.tf]"]
end

subgraph group_state["Terraform state"]
  node_local_state[("Local Terraform state<br/>[.gitignore]")]
end

node_operator(("Infrastructure operator"))
node_aws["AWS"]

node_operator -->|"runs"| node_terraform
node_terraform -->|"uses settings"| node_aws_provider
node_terraform -->|"looks up AMI"| node_ami_lookup
node_terraform -->|"provisions"| node_security_group
node_terraform -->|"provisions"| node_ec2_instance
node_ami_lookup -->|"selects image"| node_ec2_instance
node_ec2_instance -->|"uses firewall"| node_security_group
node_terraform -->|"provisions in"| node_aws
node_ec2_instance -->|"provides address"| node_public_ip
node_terraform -->|"records state"| node_local_state

click node_aws_provider "https://github.com/divsh54321/task-tracker-infra/blob/main/provider.tf"
click node_ami_lookup "https://github.com/divsh54321/task-tracker-infra/blob/main/main.tf"
click node_security_group "https://github.com/divsh54321/task-tracker-infra/blob/main/security_group.tf"
click node_ec2_instance "https://github.com/divsh54321/task-tracker-infra/blob/main/main.tf"
click node_public_ip "https://github.com/divsh54321/task-tracker-infra/blob/main/main.tf"
click node_local_state "https://github.com/divsh54321/task-tracker-infra/blob/main/.gitignore"

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,node_aws_provider,node_ami_lookup,node_public_ip toneBlue
class node_security_group,node_ec2_instance toneAmber
class node_local_state toneMint
class node_operator,node_aws toneIndigo
```

## Components

### Terraform configuration

- **Terraform CLI**
- [AWS provider settings](https://github.com/divsh54321/task-tracker-infra/blob/main/provider.tf): `provider.tf`
- [Ubuntu AMI lookup](https://github.com/divsh54321/task-tracker-infra/blob/main/main.tf): `main.tf`
- [Public IP output](https://github.com/divsh54321/task-tracker-infra/blob/main/main.tf): `main.tf`

### AWS infrastructure

- [Security group](https://github.com/divsh54321/task-tracker-infra/blob/main/security_group.tf): `security_group.tf`
- [EC2 instance](https://github.com/divsh54321/task-tracker-infra/blob/main/main.tf): `main.tf`

### Terraform state

- [Local Terraform state](https://github.com/divsh54321/task-tracker-infra/blob/main/.gitignore): `.gitignore`

### Other components

- **Infrastructure operator**
- **AWS**

## Connections

- Infrastructure operator → Terraform CLI: runs (evidence: `README.md`)
- Terraform CLI → AWS provider settings: uses settings (evidence: `README.md`)
- Terraform CLI → Ubuntu AMI lookup: looks up AMI (evidence: `README.md`)
- Terraform CLI → Security group: provisions (evidence: `README.md`)
- Terraform CLI → EC2 instance: provisions (evidence: `README.md`)
- Ubuntu AMI lookup → EC2 instance: selects image (evidence: `README.md`)
- EC2 instance → Security group: uses firewall (evidence: `README.md`)
- Terraform CLI → AWS: provisions in (evidence: `README.md`)
- EC2 instance → Public IP output: provides address (evidence: `README.md`)
- Terraform CLI → Local Terraform state: records state (evidence: `README.md`)
