# energy-dsi/dpn-infrastructure-aws architecture

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

- Interactive diagram: https://gitdiagram.com/energy-dsi/dpn-infrastructure-aws
- Repository: https://github.com/energy-dsi/dpn-infrastructure-aws

## Overview

This repository is an OpenTofu reference implementation for deploying a single-environment AWS EKS platform. The documented workflow is an operator bootstrapping encrypted remote state, then configuring AWS access and applying the platform stack. The map preserves the major infrastructure capabilities described in the README, including networking, compute, data, Kubernetes, and security. Source excerpts were unavailable, so relationships are limited to README-documented deployment steps and integrations; module-to-module calls are not inferred.

Main entry points: [`infrastructure/Tofu/bootstrap`](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/bootstrap) (State bootstrap), [`infrastructure/Tofu/modules/security`](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/security) (Threat protection), [`infrastructure/Tofu/scripts/deploy.sh`](https://github.com/energy-dsi/dpn-infrastructure-aws/blob/main/infrastructure/Tofu/scripts/deploy.sh) (Deploy helper), [`infrastructure/Tofu/main.tf`](https://github.com/energy-dsi/dpn-infrastructure-aws/blob/main/infrastructure/Tofu/main.tf) (Platform stack)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deployment["Deployment and state"]
  node_bootstrap["State bootstrap"]
  node_deploy["Deploy helper<br/>[deploy.sh]"]
  node_root["Platform stack<br/>[main.tf]"]
  node_state_s3[("State bucket")]
  node_state_lock[("State locking")]
end

subgraph group_network["Network and compute"]
  node_networking["VPC networking"]
  node_eks["EKS cluster"]
  node_management["Management host"]
end

subgraph group_platform["Kubernetes platform"]
  node_kube_platform["Kubernetes platform"]
  node_ingress["Ingress resources"]
  node_lb_irsa["Load balancer IRSA"]
  node_workload_identity["Workload identity"]
  node_app_irsa["Application IRSA"]
end

subgraph group_data["Data services"]
  node_registry[("Container registry")]
  node_storage[("S3 storage")]
  node_database[("PostgreSQL database")]
end

subgraph group_security["Security and operations"]
  node_observability["Observability"]
  node_compliance["Compliance services"]
  node_security["Threat protection"]
end

node_operator(("Platform operator"))
node_sns["Amazon SNS"]
node_sqs["Amazon SQS"]

node_operator -->|"bootstraps state"| node_bootstrap
node_operator -->|"runs deployment"| node_deploy
node_deploy -->|"deploys stack"| node_root
node_bootstrap -->|"creates state bucket"| node_state_s3
node_bootstrap -->|"creates lock table"| node_state_lock
node_security -->|"delivers scan results"| node_sns
node_security -->|"delivers scan results"| node_sqs

click node_bootstrap "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/bootstrap"
click node_deploy "https://github.com/energy-dsi/dpn-infrastructure-aws/blob/main/infrastructure/Tofu/scripts/deploy.sh"
click node_root "https://github.com/energy-dsi/dpn-infrastructure-aws/blob/main/infrastructure/Tofu/main.tf"
click node_networking "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/networking"
click node_eks "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/eks"
click node_management "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/management_host"
click node_kube_platform "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/kubernetes_platform"
click node_ingress "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/ingress"
click node_lb_irsa "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/aws_load_balancer_controller_irsa"
click node_workload_identity "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/workload_identity"
click node_app_irsa "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/app_irsa"
click node_registry "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/container_registry"
click node_storage "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/storage"
click node_database "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/database"
click node_observability "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/observability"
click node_compliance "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/compliance"
click node_security "https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/security"

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_bootstrap,node_deploy,node_root,node_state_s3,node_state_lock toneBlue
class node_networking,node_eks,node_management toneAmber
class node_kube_platform,node_ingress,node_lb_irsa,node_workload_identity,node_app_irsa toneMint
class node_registry,node_storage,node_database toneRose
class node_observability,node_compliance,node_security,node_operator,node_sns,node_sqs toneIndigo
```

## Components

### Deployment and state

- [State bootstrap](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/bootstrap): `infrastructure/Tofu/bootstrap`
- [Deploy helper](https://github.com/energy-dsi/dpn-infrastructure-aws/blob/main/infrastructure/Tofu/scripts/deploy.sh): `infrastructure/Tofu/scripts/deploy.sh`
- [Platform stack](https://github.com/energy-dsi/dpn-infrastructure-aws/blob/main/infrastructure/Tofu/main.tf): `infrastructure/Tofu/main.tf`
- **State bucket**
- **State locking**

### Network and compute

- [VPC networking](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/networking): `infrastructure/Tofu/modules/networking`
- [EKS cluster](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/eks): `infrastructure/Tofu/modules/eks`
- [Management host](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/management_host): `infrastructure/Tofu/modules/management_host`

### Kubernetes platform

- [Kubernetes platform](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/kubernetes_platform): `infrastructure/Tofu/modules/kubernetes_platform`
- [Ingress resources](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/ingress): `infrastructure/Tofu/modules/ingress`
- [Load balancer IRSA](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/aws_load_balancer_controller_irsa): `infrastructure/Tofu/modules/aws_load_balancer_controller_irsa`
- [Workload identity](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/workload_identity): `infrastructure/Tofu/modules/workload_identity`
- [Application IRSA](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/app_irsa): `infrastructure/Tofu/modules/app_irsa`

### Data services

- [Container registry](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/container_registry): `infrastructure/Tofu/modules/container_registry`
- [S3 storage](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/storage): `infrastructure/Tofu/modules/storage`
- [PostgreSQL database](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/database): `infrastructure/Tofu/modules/database`

### Security and operations

- [Observability](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/observability): `infrastructure/Tofu/modules/observability`
- [Compliance services](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/compliance): `infrastructure/Tofu/modules/compliance`
- [Threat protection](https://github.com/energy-dsi/dpn-infrastructure-aws/tree/main/infrastructure/Tofu/modules/security): `infrastructure/Tofu/modules/security`

### Other components

- **Platform operator**
- **Amazon SNS**
- **Amazon SQS**

## Connections

- Platform operator → State bootstrap: bootstraps state (evidence: `README.md`)
- Platform operator → Deploy helper: runs deployment (evidence: `README.md`)
- Deploy helper → Platform stack: deploys stack (evidence: `README.md`)
- State bootstrap → State bucket: creates state bucket (evidence: `README.md`)
- State bootstrap → State locking: creates lock table (evidence: `README.md`)
- Threat protection → Amazon SNS: delivers scan results (evidence: `README.md`)
- Threat protection → Amazon SQS: delivers scan results (evidence: `README.md`)
