How pulumi-csa/architecture-diagrams works
1. This repository is a documentation/diagram artifact, not the infrastructure itself. Its job is to describe Pulumi-managed production infrastructure in Markdown files containing Mermaid diagrams, so an engineer can understand the system at both stack and whole-environment levels.
2. The repository is organized around two diagram boundaries:
- stacks/ for single-stack views
- master/ for cross-stack, end-to-end overviews
This is the main architectural split in the repo.
3. The production infrastructure is divided into three stacks, each with its own diagram:
- IAM infrastructure
- Network infrastructure
- Cluster infrastructure
These stack diagrams are meant to show internal resource relationships, dependencies, and exported values within one Pulumi stack.
4. The master/prod-infrastructure-overview.md file is the top-level system view. It is the diagram that ties the stacks together and shows inter-stack dependencies, security boundaries, and data flow across the full production environment.
5. The underlying runtime architecture being documented is an AWS-based container platform in us-east-1:
- VPC, subnets, routing, and internet connectivity
- ECS cluster and ECS services
- Fargate-hosted containerized application
- IAM roles/policies
- CloudWatch logging with retention
So the diagrams represent a containerized web application on AWS, not a general-purpose app repo.
6. The primary data flow boundary is network traffic from external clients into the VPC and onward to the ECS service running the Nginx container. The diagrams are expected to show network paths with dotted Mermaid edges, while stack outputs/inputs and permissions are shown as dependency edges between stacks or resources.
7. The repo also encodes visual conventions as a first-class concern. VISUAL_STANDARDS.md defines the diagram language:
- Mermaid syntax
- AWS-inspired color categories for IAM, networking, compute, containers, logging, external systems, and outputs
- Standard node labels for resources, IDs, and config values
This makes the diagrams consistent enough to be used as architecture references.
8. templates/ provides the scaffolding for new diagrams:
- stack-template.md
- master-template.md
These templates define the expected structure for future stack diagrams and future environment-level overviews.
9. UPDATE_PROCEDURES.md defines the maintenance workflow. Diagrams are treated as living documentation and should be updated when resource sets, configurations, security posture, or cross-stack dependencies change. The process centers on comparing against Pulumi resource state, editing the relevant Markdown diagrams, and validating the result.
10. The repository includes automation hooks around diagram correctness. The README references validation and generation scripts plus CI/CD integration, implying a pipeline that checks Mermaid syntax and helps regenerate diagrams from Pulumi state. In architecture terms, this is a documentation quality-control layer rather than an application runtime layer.
11. The key system boundary represented here is the separation of concerns between infrastructure layers:
- IAM controls identity and permissions
- Network controls connectivity and isolation
- Cluster controls compute and application execution
The master diagram should show how these layers interact, while the stack diagrams should stay inside their own operational scope.
12. Overall, the repo’s architecture is: Pulumi production state as the source of truth, Markdown/Mermaid files as the visualization layer, templates and standards as governance, and validation/update procedures as the maintenance pipeline. An accurate diagram of this repository would therefore show documentation assets centered around three production stacks and one cross-stack overview.
Main entry points: prod-infrastructure-overview.md Prod overview · iam-infrastructure-prod.md IAM stack · network-infrastructure-prod.md Network stack · cluster-infrastructure-prod.md Cluster stack
Components 15
Governance
Standards, procedures, and template scaffolding for keeping diagrams consistent.
- README · Repository overview and links to generation/validation guidance.
README.md - Standards · Visual conventions and Mermaid language rules for all diagrams.
VISUAL_STANDARDS.md - Update flow · Maintenance process for keeping diagrams aligned with Pulumi state.
UPDATE_PROCEDURES.md - Master template · Scaffold for cross-stack environment overview diagrams.
templates/master-template.md - Stack template · Scaffold for single-stack infrastructure diagrams.
templates/stack-template.md - Validation · Diagram correctness checks and generation hooks referenced by the docs.
Diagram artifacts
Markdown diagrams that document the production environment at stack and master scope.
- Prod overview · Environment-level view tying stacks together and showing cross-stack flow.
master/prod-infrastructure-overview.md - IAM stack · Single-stack diagram for identity, roles, and policies.
stacks/iam-infrastructure-prod.md - Network stack · Single-stack diagram for VPC, subnets, routing, and connectivity.
stacks/network-infrastructure-prod.md - Cluster stack · Single-stack diagram for ECS cluster, services, and application execution.
stacks/cluster-infrastructure-prod.md
Production model
The Pulumi-managed AWS infrastructure model these diagrams describe.
- Pulumi state · Authoritative production infrastructure state used to derive and update the diagrams.
- Clients · Outside users and traffic entering the documented environment.
- IAM layer · Identity and permission boundary for the production environment.
- Network layer · VPC and routing boundary that controls ingress, isolation, and egress.
- Compute layer · ECS/Fargate execution boundary for the containerized application.
Connections 24
- README → Standards: documents · README points to the diagram language and conventions.
- README → Update flow: guides · README points to the maintenance workflow.
- README → Validation: references · README references validation and generation automation.
- Standards → Master template: shapes · The standards define the structure and style expected by templates.
- Standards → Stack template: shapes · The standards define the structure and style expected by templates.
- Update flow → Pulumi state: syncs · Updates are driven by comparing diagrams to Pulumi resource state.
- Validation → Prod overview: checks · Validation acts on rendered markdown diagrams.
- Validation → IAM stack: checks · Validation acts on rendered markdown diagrams.
- Validation → Network stack: checks · Validation acts on rendered markdown diagrams.
- Validation → Cluster stack: checks · Validation acts on rendered markdown diagrams.
- Pulumi state → Prod overview: drives · The environment overview is derived from the live Pulumi-managed state.
- Pulumi state → IAM stack: drives · The stack diagram is derived from the live Pulumi-managed state.
- Pulumi state → Network stack: drives · The stack diagram is derived from the live Pulumi-managed state.
- Pulumi state → Cluster stack: drives · The stack diagram is derived from the live Pulumi-managed state.
- Prod overview → IAM stack: depends on · The master diagram ties together the IAM stack boundary.
- Prod overview → Network stack: depends on · The master diagram ties together the network stack boundary.
- Prod overview → Cluster stack: depends on · The master diagram ties together the cluster stack boundary.
- Prod overview → Clients: shows ingress from · The top-level view includes outside traffic entering the environment.
- Clients → Network layer: traffic · External clients enter through the network boundary.
- Network layer → Compute layer: routes to · Network paths connect ingress to the ECS/Fargate application boundary.
- IAM layer → Compute layer: permits · IAM roles and policies authorize cluster and service actions.
- IAM stack → IAM layer: documents · The IAM stack diagram documents this boundary.
- Network stack → Network layer: documents · The network stack diagram documents this boundary.
- Cluster stack → Compute layer: documents · The cluster stack diagram documents this boundary.