# sispaing/cloudbank-lab architecture

> Architecture diagram of the GitHub repository sispaing/cloudbank-lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sispaing/cloudbank-lab
- Repository: https://github.com/sispaing/cloudbank-lab

## Overview

cloudbank-lab is a Terraform-managed, three-VPC AWS lab. Its infrastructure workflow is coordinated by the dev environment, which configures reusable modules for networking, security, compute, load balancing, certificates, DNS, and artifact delivery. At runtime, a request to the customer-profile endpoint traverses the customer-profile, account, and statement tiers across chained VPC peering. The README documents these capabilities and value-passing, but no source excerpts were provided; edges therefore cite documented relationships rather than inspected Terraform calls.

Main entry points: [`envs/dev/network.tf`](https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/network.tf) (Network config), [`modules/alb/main.tf`](https://github.com/sispaing/cloudbank-lab/blob/main/modules/alb/main.tf) (Application load balancers), [`modules/dns/main.tf`](https://github.com/sispaing/cloudbank-lab/blob/main/modules/dns/main.tf) (Route 53 records), [`envs/dev/compute.tf`](https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/compute.tf) (Compute config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coordination["Environment coordination"]
  node_dev_network["Network config<br/>[network.tf]"]
  node_dev_security["Security config<br/>[security.tf]"]
  node_dev_compute["Compute config<br/>[compute.tf]"]
  node_dev_lb["Load balancer config<br/>[loadbalancer.tf]"]
  node_dev_dns["DNS config<br/>[dns.tf]"]
end

subgraph group_network["Network and security"]
  node_vpc["VPCs and subnets<br/>[main.tf]"]
  node_peering["VPC peering<br/>[main.tf]"]
  node_security_groups["Security groups<br/>[main.tf]"]
end

subgraph group_runtime["Compute and traffic"]
  node_ec2["Tier instances<br/>[main.tf]"]
  node_startup["Tier startup"]
  node_alb["Application load balancers<br/>[main.tf]"]
end

subgraph group_services["DNS and artifacts"]
  node_acm["TLS certificate<br/>[main.tf]"]
  node_dns["Route 53 records<br/>[main.tf]"]
  node_artifacts[("Private S3 artifacts<br/>[main.tf]")]
end

node_operator(("User / operator"))
node_customer_profile["Customer-profile tier"]
node_account["Account tier"]
node_statement["Statement tier"]

node_operator -->|"deploys"| node_dev_network
node_dev_network -->|"configures"| node_vpc
node_dev_network -->|"configures"| node_peering
node_dev_network -->|"configures"| node_artifacts
node_dev_security -->|"configures"| node_security_groups
node_dev_compute -->|"configures"| node_ec2
node_dev_compute -->|"fills"| node_startup
node_dev_lb -->|"configures"| node_alb
node_dev_dns -->|"configures"| node_acm
node_dev_dns -->|"configures"| node_dns
node_operator -->|"requests hostname"| node_dns
node_dns -->|"resolves to"| node_alb
node_alb -.->|"routes traffic"| node_customer_profile
node_customer_profile -->|"calls"| node_account
node_account -->|"calls"| node_statement

click node_dev_network "https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/network.tf"
click node_dev_security "https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/security.tf"
click node_dev_compute "https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/compute.tf"
click node_dev_lb "https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/loadbalancer.tf"
click node_dev_dns "https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/dns.tf"
click node_vpc "https://github.com/sispaing/cloudbank-lab/blob/main/modules/vpc/main.tf"
click node_peering "https://github.com/sispaing/cloudbank-lab/blob/main/modules/vpc-peering/main.tf"
click node_security_groups "https://github.com/sispaing/cloudbank-lab/blob/main/modules/security-group/main.tf"
click node_ec2 "https://github.com/sispaing/cloudbank-lab/blob/main/modules/ec2/main.tf"
click node_startup "https://github.com/sispaing/cloudbank-lab/blob/main/templates/fake-service.sh.tftpl"
click node_alb "https://github.com/sispaing/cloudbank-lab/blob/main/modules/alb/main.tf"
click node_acm "https://github.com/sispaing/cloudbank-lab/blob/main/modules/acm/main.tf"
click node_dns "https://github.com/sispaing/cloudbank-lab/blob/main/modules/dns/main.tf"
click node_artifacts "https://github.com/sispaing/cloudbank-lab/blob/main/modules/artifacts/main.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_dev_network,node_dev_security,node_dev_compute,node_dev_lb,node_dev_dns,node_operator toneBlue
class node_vpc,node_peering,node_security_groups toneAmber
class node_ec2,node_startup,node_alb toneMint
class node_acm,node_dns,node_artifacts toneRose
class node_customer_profile,node_account,node_statement toneIndigo
```

## Components

### Environment coordination

- [Network config](https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/network.tf): `envs/dev/network.tf`
- [Security config](https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/security.tf): `envs/dev/security.tf`
- [Compute config](https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/compute.tf): `envs/dev/compute.tf`
- [Load balancer config](https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/loadbalancer.tf): `envs/dev/loadbalancer.tf`
- [DNS config](https://github.com/sispaing/cloudbank-lab/blob/main/envs/dev/dns.tf): `envs/dev/dns.tf`

### Network and security

- [VPCs and subnets](https://github.com/sispaing/cloudbank-lab/blob/main/modules/vpc/main.tf): `modules/vpc/main.tf`
- [VPC peering](https://github.com/sispaing/cloudbank-lab/blob/main/modules/vpc-peering/main.tf): `modules/vpc-peering/main.tf`
- [Security groups](https://github.com/sispaing/cloudbank-lab/blob/main/modules/security-group/main.tf): `modules/security-group/main.tf`

### Compute and traffic

- [Tier instances](https://github.com/sispaing/cloudbank-lab/blob/main/modules/ec2/main.tf): `modules/ec2/main.tf`
- [Tier startup](https://github.com/sispaing/cloudbank-lab/blob/main/templates/fake-service.sh.tftpl): `templates/fake-service.sh.tftpl`
- [Application load balancers](https://github.com/sispaing/cloudbank-lab/blob/main/modules/alb/main.tf): `modules/alb/main.tf`

### DNS and artifacts

- [TLS certificate](https://github.com/sispaing/cloudbank-lab/blob/main/modules/acm/main.tf): `modules/acm/main.tf`
- [Route 53 records](https://github.com/sispaing/cloudbank-lab/blob/main/modules/dns/main.tf): `modules/dns/main.tf`
- [Private S3 artifacts](https://github.com/sispaing/cloudbank-lab/blob/main/modules/artifacts/main.tf): `modules/artifacts/main.tf`

### Other components

- **User / operator**
- **Customer-profile tier**
- **Account tier**
- **Statement tier**

## Connections

- User / operator → Network config: deploys (evidence: `README.md`)
- Network config → VPCs and subnets: configures (evidence: `README.md`)
- Network config → VPC peering: configures (evidence: `README.md`)
- Network config → Private S3 artifacts: configures (evidence: `README.md`)
- Security config → Security groups: configures (evidence: `README.md`)
- Compute config → Tier instances: configures (evidence: `README.md`)
- Compute config → Tier startup: fills (evidence: `README.md`)
- Load balancer config → Application load balancers: configures (evidence: `README.md`)
- DNS config → TLS certificate: configures (evidence: `README.md`)
- DNS config → Route 53 records: configures (evidence: `README.md`)
- User / operator → Route 53 records: requests hostname (evidence: `README.md`)
- Route 53 records → Application load balancers: resolves to (evidence: `README.md`)
- Application load balancers → Customer-profile tier: routes traffic
- Customer-profile tier → Account tier: calls (evidence: `README.md`)
- Account tier → Statement tier: calls (evidence: `README.md`)
