We often encounter this situation: a new engineer joins a project and, instead of clear documentation, sees only a repository with Terraform code. Figuring out VPC peerings, ECS clusters, and RDS replication from HCL files wastes days. In the era of digital transformation, this approach is unacceptable. We solve this by creating complete architectural documentation that doesn't just describe but explains the decisions.
Architectural documentation isn't diagrams for their own sake. It preserves the context of trade-offs: why we chose Transit Gateway over VPC Peering, why the database subnet is isolated, why a NAT Gateway in each AZ. Our experience shows: without such documentation, MTTR grows by 30–50%, and onboarding new team members drags on for weeks. Once you get documentation, you cut project introduction time by 3x.
What is lost without documentation
The most costly loss is decision context. A year after designing the network, no one remembers the rationale for choosing Transit Gateway over VPC Peering, the reasons for isolating the database subnet, or the justification for using NAT Gateway in each AZ. When it's time to change the architecture, meetings ensue, attempts to recall, calls to the solution author (who long ago left). That's wasted time – something that Architecture Decision Records prevent completely. Additionally, during incidents, the team spends up to 2 hours determining service dependencies – increasing MTTR by 40%.
What infrastructure architecture documentation includes
Network architecture. VPC topology: CIDR blocks, subnet breakdown (public/private/database/management), routing tables, security groups matrix. The diagram shows how traffic flows from user to database – through Load Balancer, through VPN or Direct Connect, through NAT. Not just a diagram – with port ranges and security group rules for each hop.
Compute architecture. How workloads are deployed: ECS/EKS, EC2, Lambda. For Kubernetes – namespace structure, node groups (spot vs on-demand), autoscaling policy (HPA/VPA), cluster add-ons (CNI, ingress controller, cert-manager, external-secrets).
Data architecture. Placement of databases, replica topology, backup policies, retention periods. RDS Multi-AZ vs Single-AZ – why one option was chosen. Redis cluster mode vs standalone. Encryption at rest and in transit.
CI/CD pipeline diagram. Description of stages, triggers, and approval gates from commit to production. Dependency map – which service depends on what (databases, external APIs, message queues). This is critical for incident impact analysis: if Redis fails, which services degrade and which completely break.
Format: C4 Model
We use the C4 Model – four levels of detail: Context, Container, Component, Code. Diagrams in Mermaid or PlantUML – stored in the repository alongside the code, versioned with it. The C4 Model is 3x more intuitive than textual descriptions, and automatic diagram generation when Terraform changes ensures documentation always matches reality.
graph TB
User --> ALB[Application Load Balancer]
ALB --> ECS[ECS Fargate Cluster]
ECS --> RDS[(RDS PostgreSQL Multi-AZ)]
ECS --> ElastiCache[(ElastiCache Redis)]
ECS --> S3[(S3 Bucket)] | Format | Versioning | Automation | Relevance |
|---|---|---|---|
| Confluence | No | No | Drops after first change |
| Markdown in Git | Yes | Yes (CI/CD) | Always matches code |
Architecture Decision Records
For every significant architectural decision – an ADR in the docs/adr/ folder. Example:
ADR-007: Choosing ECS Fargate over EKS
# ADR-007: Choosing ECS Fargate over EKS
**Status:** Accepted
**Context:** Team of 4, 8 microservices, no Kubernetes expertise.
**Decision:** ECS Fargate – less operational overhead, no node management.
**Alternatives:** EKS – overkill for current scale, requires Kubernetes expertise.
**Consequences:** On growth to 20+ services, reconsider in favor of EKS. How infrastructure documentation reduces MTTR?
During an incident, each minute of downtime costs money. Without documentation, an engineer spends time figuring out which services depend on the failed component. With a dependency map and clear architecture diagram, analysis time is cut by 5x. For example, when Redis fails, we immediately see that cart and session services are affected, while payments still work. This allows for more precise recovery prioritization.
Why C4 Model is better than other formats?
The C4 Model provides exactly four levels of detail – from context to code. This prevents over-detailed documentation; maintaining such a document is easier than multi-page Visio diagrams. According to our project statistics, teams spend 2x less time updating C4 diagrams than maintaining Confluence pages.
How to integrate documentation into CI/CD?
Documentation should be a living artifact, not static. We recommend:
- Store it in the
docs/repository with the same code review rules. - With each Terraform or Helm change, generate updated diagrams via scripts.
- Add validation of links and ADRs to the pipeline.
- Use Git hooks to synchronize diagrams with infrastructure.
Documentation development process
| Stage | Description | Duration |
|---|---|---|
| Analytics | Interviews with architects, gathering configurations | 1-2 days |
| Design | Creating C4 diagrams, writing ADRs | 1-2 days |
| Implementation | Page layout, CI/CD integration | 1 day |
| Testing | Relevance check, team review | 1 day |
| Deploy | Deployment, team training | 1 day |
Timeline and approach
Documentation development takes 3 to 5 days for a medium-scale project (10–20 microservices, one cloud). This includes architect interviews, creating 10–15 diagrams, writing 5–10 ADRs for existing solutions, and setting up the process to keep documentation current. We don't publish fixed prices – cost is determined after analysis.
Typical mistakes and how to avoid them
- Storing in Confluence – documentation goes stale instantly. Solution: Git + CI/CD.
- Missing ADRs – in six months no one remembers why decisions were made. Solution: record every significant decision.
- Overly detailed diagrams – hard to maintain. Solution: C4 Model with two or three levels.
- Not included in onboarding – documentation gathers dust. Solution: make it part of the new-hire checklist.
Order infrastructure architecture documentation for your infrastructure – it will save your team hundreds of hours. Get in touch with us to order development and speed up onboarding. Receive a consultation on integrating documentation into your CI/CD.
We have been delivering such solutions for over 10 years, with 40+ projects behind us. Don't let tribal knowledge hold your team back – invest in living documentation.







