# bigsnack7/terraform-honeypot_lab architecture

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

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

## Overview

Terraform Honeypot Lab provisions three opt-in, isolated AWS decoys and a monitoring environment. The principal workflow is internet traffic reaching a decoy, telemetry flowing to CloudWatch Logs, and analysts manually investigating it with saved Logs Insights queries; CloudTrail separately records management events in S3. The graph also preserves the documented isolation, management, alerting, budget, and optional security capabilities. Relationships reflect the README’s architecture; sampled source covered only the peripheral plan guard, so Terraform module wiring is not independently verified.

Main entry points: [`terraform/modules/monitoring/main.tf`](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf) (CloudWatch Logs), [`terraform/modules/networking/main.tf`](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/networking/main.tf) (Isolated VPCs), [`terraform/modules/linux-honeypot/main.tf`](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/linux-honeypot/main.tf) (Cowrie SSH decoy), [`terraform/modules/web-honeypot/main.tf`](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/web-honeypot/main.tf) (Flask web decoy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_decoys["Honeypot decoys"]
  node_linux["Cowrie SSH decoy<br/>[main.tf]"]
  node_web["Flask web decoy<br/>[main.tf]"]
  node_windows["Windows decoy<br/>[main.tf]"]
end

subgraph group_telemetry["Telemetry and audit"]
  node_logs[("CloudWatch Logs<br/>[main.tf]")]
  node_queries["Investigation queries"]
  node_alarms["Health alarms<br/>[main.tf]"]
  node_trail["CloudTrail<br/>[main.tf]"]
  node_audit[("Audit S3 bucket<br/>[main.tf]")]
end

subgraph group_operations["Isolation and operations"]
  node_network["Isolated VPCs<br/>[main.tf]"]
  node_iam["Instance IAM<br/>[main.tf]"]
  node_ssm["Systems Manager"]
  node_budget["Budget alerts<br/>[main.tf]"]
end

subgraph group_security["Optional security"]
  node_optional["GuardDuty, Security Hub, Config<br/>[main.tf]"]
end

node_internet(("Internet"))

node_internet -->|"sends traffic"| node_linux
node_internet -->|"sends traffic"| node_web
node_internet -->|"sends traffic"| node_windows
node_linux -->|"sends telemetry"| node_logs
node_web -->|"sends telemetry"| node_logs
node_windows -->|"sends telemetry"| node_logs
node_logs -->|"supports hunting"| node_queries
node_logs -->|"feeds health"| node_alarms
node_trail -->|"records events"| node_audit
node_network -->|"isolates"| node_linux
node_network -->|"isolates"| node_web
node_network -->|"isolates"| node_windows
node_iam -->|"enables access"| node_ssm
node_budget -.->|"notifies operator"| node_internet
node_optional -.->|"adds findings"| node_trail

click node_linux "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/linux-honeypot/main.tf"
click node_web "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/web-honeypot/main.tf"
click node_windows "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/windows-honeypot/main.tf"
click node_logs "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf"
click node_queries "https://github.com/bigsnack7/terraform-honeypot_lab/tree/main/detections/cloudwatch-logs-insights"
click node_alarms "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf"
click node_trail "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf"
click node_audit "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf"
click node_network "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/networking/main.tf"
click node_iam "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/iam/main.tf"
click node_budget "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf"
click node_optional "https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/security/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_linux,node_web,node_windows toneBlue
class node_logs,node_queries,node_alarms,node_trail,node_audit toneAmber
class node_network,node_iam,node_ssm,node_budget toneMint
class node_optional toneRose
class node_internet toneIndigo
```

## Components

### Honeypot decoys

- [Cowrie SSH decoy](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/linux-honeypot/main.tf): `terraform/modules/linux-honeypot/main.tf`
- [Flask web decoy](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/web-honeypot/main.tf): `terraform/modules/web-honeypot/main.tf`
- [Windows decoy](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/windows-honeypot/main.tf): `terraform/modules/windows-honeypot/main.tf`

### Telemetry and audit

- [CloudWatch Logs](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf): `terraform/modules/monitoring/main.tf`
- [Investigation queries](https://github.com/bigsnack7/terraform-honeypot_lab/tree/main/detections/cloudwatch-logs-insights): `detections/cloudwatch-logs-insights`
- [Health alarms](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf): `terraform/modules/monitoring/main.tf`
- [CloudTrail](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf): `terraform/modules/monitoring/main.tf`
- [Audit S3 bucket](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf): `terraform/modules/monitoring/main.tf`

### Isolation and operations

- [Isolated VPCs](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/networking/main.tf): `terraform/modules/networking/main.tf`
- [Instance IAM](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/iam/main.tf): `terraform/modules/iam/main.tf`
- **Systems Manager**
- [Budget alerts](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/monitoring/main.tf): `terraform/modules/monitoring/main.tf`

### Optional security

- [GuardDuty, Security Hub, Config](https://github.com/bigsnack7/terraform-honeypot_lab/blob/main/terraform/modules/security/main.tf): `terraform/modules/security/main.tf`

### Other components

- **Internet**

## Connections

- Internet → Cowrie SSH decoy: sends traffic (evidence: `README.md`)
- Internet → Flask web decoy: sends traffic (evidence: `README.md`)
- Internet → Windows decoy: sends traffic (evidence: `README.md`)
- Cowrie SSH decoy → CloudWatch Logs: sends telemetry (evidence: `README.md`)
- Flask web decoy → CloudWatch Logs: sends telemetry (evidence: `README.md`)
- Windows decoy → CloudWatch Logs: sends telemetry (evidence: `README.md`)
- CloudWatch Logs → Investigation queries: supports hunting (evidence: `README.md`)
- CloudWatch Logs → Health alarms: feeds health (evidence: `README.md`)
- CloudTrail → Audit S3 bucket: records events (evidence: `README.md`)
- Isolated VPCs → Cowrie SSH decoy: isolates (evidence: `README.md`)
- Isolated VPCs → Flask web decoy: isolates (evidence: `README.md`)
- Isolated VPCs → Windows decoy: isolates (evidence: `README.md`)
- Instance IAM → Systems Manager: enables access (evidence: `README.md`)
- Budget alerts → Internet: notifies operator (evidence: `README.md`)
- GuardDuty, Security Hub, Config → CloudTrail: adds findings (evidence: `README.md`)
