# azysir/terraform-aws-landing-zone-structure architecture

> Architecture diagram of the GitHub repository azysir/terraform-aws-landing-zone-structure, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/azysir/terraform-aws-landing-zone-structure
- Repository: https://github.com/azysir/terraform-aws-landing-zone-structure

## Overview

##### Project Type and Purpose
- This is an infrastructure-as-code project: a Terraform-based AWS Landing Zone.
- It implements AWS Security Reference Architecture (SRA) with multi-account, multi-domain, multi-region structure.

##### Main Components
- **Bootstrap Domain**: foundation (state buckets, IAM bootstrapping)
- **Org Domain**: AWS Organizations & SCPs
- **Identity Domain**: AWS Identity Center (SSO)
- **Security Domain**: Config, Security Hub, GuardDuty
- **Logging Domain**: CloudTrail, log aggregation
- **Networking Domain**: VPCs, subnets, transit, DNS
- **Backup Domain**: AWS Backup vaults & policies
- **Shared Services Domain**: cross-account utilities
- **Workloads Domain**: application environments, grouped by region (ap-southeast-2, eu-west-1, eu-west-2)

##### Relationships & Flow
- **Bootstrap → Org**: bootstrap must run first
- **Org → {Identity, Security, Logging, Networking}**: core domains depend on org
- **Core Domains → Shared Services → Backup → Workloads**
- Within Workloads: single “Workloads” module splits into regional sub-modules

##### Architectural Patterns & Tech
- **Modularity**: each domain = independent Terraform module
- **Remote State**: S3 + DynamoDB locking
- **Multi-Account**: AWS Organizations with SCPs
- **Multi-Region**: workload modules parameterized by region
- **CI/CD**: GitHub Actions for terraform-validate & deploy
- **Makefile**: orchestration wrapper

## Diagram (Mermaid)

```mermaid
graph LR
    %% Domains
    subgraph "Bootstrap Domain"
        BD["Bootstrap Domain\n(S3 state, DynamoDB lock)"]:::grey
    end

    subgraph "Org Domain"
        OD["Org Domain\n(AWS Organizations, SCPs)"]:::grey
    end

    subgraph "Core Infrastructure"
        ID["Identity Domain"]:::blue
        SD["Security Domain"]:::blue
        LD["Logging Domain"]:::blue
        ND["Networking Domain"]:::blue
    end

    subgraph "Shared & Backup Domains"
        subgraph "Shared Services Domain"
            SSD["Shared Services"]:::green
        end
        subgraph "Backup Domain"
            BDp["Backup Domain"]:::green
        end
    end

    subgraph "Workloads Domain"
        WLD["Workloads"]:::orange
        subgraph "Regions"
            W1["Dev ap-southeast-2"]:::orange
            W2["Dev eu-west-1"]:::orange
            W3["Dev eu-west-2"]:::orange
            W4["Prd ap-southeast-2"]:::orange
            W5["Prd eu-west-1"]:::orange
            W6["Prd eu-west-2"]:::orange
        end
    end

    %% Dependencies / Flow
    BD -->|bootstrap→org| OD
    OD -->|org→core| ID
    OD -->|org→core| SD
    OD -->|org→core| LD
    OD -->|org→core| ND
    ND -->|core→shared| SSD
    SSD -->|shared→backup| BDp
    BDp -->|backup→workloads| WLD

    %% Click Events
    click BD "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/bootstrap"
    click OD "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/org"
    click ID "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/identity"
    click SD "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/security"
    click LD "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/logging"
    click ND "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/networking"
    click SSD "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/sharedservices"
    click BDp "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/backup"
    click WLD "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/workloads/app"
    click W1 "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/workloads/app/dev/ap-southeast-2"
    click W2 "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/workloads/app/dev/eu-west-1"
    click W3 "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/workloads/app/dev/eu-west-2"
    click W4 "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/workloads/app/prd/ap-southeast-2"
    click W5 "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/workloads/app/prd/eu-west-1"
    click W6 "https://github.com/azysir/terraform-aws-landing-zone-structure/tree/main/domain/workloads/app/prd/eu-west-2"

    %% Styles
    classDef grey fill:#dddddd,stroke:#888888,color:#000000;
    classDef blue fill:#c6e2ff,stroke:#3399ff,color:#000000;
    classDef green fill:#d0f0c0,stroke:#00aa00,color:#000000;
    classDef orange fill:#ffd8b1,stroke:#ff9900,color:#000000;
```
