# tf-landingzone/aws-lz-platform architecture

> Architecture diagram of the GitHub repository tf-landingzone/aws-lz-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tf-landingzone/aws-lz-platform
- Repository: https://github.com/tf-landingzone/aws-lz-platform

## Overview

This repository is the Terraform engine for an AWS Landing Zone. Its main workflow turns YAML configuration into Terraform variables, then applies the platform stacks in documented order, with a landing-zone stack that orchestrates stacks 01–06. Separate account-provisioning paths run account-setup across individual accounts or launch Step Functions executions from a manifest. The README documents the stack capabilities and ordering; sampled scripts show variable generation and account orchestration. Terraform internals and workflow definitions were not sampled, so edges between those components reflect README statements only.

Main entry points: [`scripts/generate_stack_tfvars.py`](https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/generate_stack_tfvars.py) (Stack variables), [`stacks/landing-zone`](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/landing-zone) (Landing-zone orchestrator), [`scripts/deploy_accounts.py`](https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/deploy_accounts.py) (Fleet deployer), [`config`](https://github.com/tf-landingzone/aws-lz-platform/tree/main/config) (YAML configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Configuration"]
  node_yaml_config["YAML configuration"]
  node_landing_vars["Landing-zone variables"]
  node_stack_vars["Stack variables"]
end

subgraph group_platform["Landing Zone Platform"]
  node_bootstrap["Bootstrap stack"]
  node_organizations["Organizations"]
  node_security["Security"]
  node_networking["Networking"]
  node_logging["Logging"]
  node_operations["Operations"]
  node_workload_support["Workload support"]
  node_landing_zone["Landing-zone orchestrator"]
  node_permission_sets["Permission sets"]
end

subgraph group_account_ops["Account Operations"]
  node_account_setup["Account setup"]
  node_account_deployer["Fleet deployer<br/>[deploy_accounts.py]"]
  node_sfn_launcher["Pipeline launcher<br/>[sfn_launcher.py]"]
  node_drift_report["Drift report"]
end

subgraph group_shared["Shared Runtime"]
  node_hcl_writer["HCL writer<br/>[hcl_writer.py]"]
  node_run_state[("Deployment run state")]
end

node_operator(("Platform operator"))
node_aws_step_functions["AWS Step Functions"]
node_aws_s3[("AWS S3")]

node_operator -->|"edits"| node_yaml_config
node_yaml_config -->|"configures"| node_landing_vars
node_yaml_config -->|"configures"| node_stack_vars
node_landing_vars -->|"calls"| node_hcl_writer
node_stack_vars -->|"uses"| node_hcl_writer
node_landing_vars -->|"writes variables"| node_landing_zone
node_stack_vars -->|"generates variables"| node_organizations
node_stack_vars -->|"generates variables"| node_security
node_stack_vars -->|"generates variables"| node_networking
node_stack_vars -->|"generates variables"| node_logging
node_stack_vars -->|"generates variables"| node_operations
node_stack_vars -->|"generates variables"| node_workload_support
node_operator -->|"applies first"| node_bootstrap
node_landing_zone -->|"orchestrates"| node_organizations
node_landing_zone -->|"orchestrates"| node_security
node_landing_zone -->|"orchestrates"| node_networking
node_landing_zone -->|"orchestrates"| node_logging
node_landing_zone -->|"orchestrates"| node_operations
node_landing_zone -->|"orchestrates"| node_workload_support
node_operator -->|"deploys"| node_permission_sets
node_operator -->|"runs"| node_account_deployer
node_account_deployer -->|"plans and applies"| node_account_setup
node_account_deployer -->|"reads and writes"| node_run_state
node_account_deployer -->|"produces report for"| node_drift_report
node_operator -->|"launches"| node_sfn_launcher
node_sfn_launcher -->|"uploads manifest"| node_aws_s3
node_sfn_launcher -->|"starts execution"| node_aws_step_functions
node_operator -->|"provisions account"| node_account_setup

click node_yaml_config "https://github.com/tf-landingzone/aws-lz-platform/tree/main/config"
click node_landing_vars "https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/generate_landing_zone_tfvars.py"
click node_stack_vars "https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/generate_stack_tfvars.py"
click node_hcl_writer "https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/hcl_writer.py"
click node_bootstrap "https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/00-bootstrap"
click node_organizations "https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/01-organizations"
click node_security "https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/02-security"
click node_networking "https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/03-networking"
click node_logging "https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/04-logging"
click node_operations "https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/05-operations"
click node_workload_support "https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/06-workload-support"
click node_landing_zone "https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/landing-zone"
click node_permission_sets "https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/permission-sets"
click node_account_setup "https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/account-setup"
click node_account_deployer "https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/deploy_accounts.py"
click node_sfn_launcher "https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/sfn_launcher.py"
click node_drift_report "https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/generate_drift_report.py"

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_yaml_config,node_landing_vars,node_stack_vars toneBlue
class node_bootstrap,node_organizations,node_security,node_networking,node_logging,node_operations,node_workload_support,node_landing_zone,node_permission_sets,node_aws_s3 toneAmber
class node_account_setup,node_account_deployer,node_sfn_launcher,node_drift_report toneMint
class node_hcl_writer,node_run_state toneRose
class node_operator,node_aws_step_functions toneIndigo
```

## Components

### Configuration

- [YAML configuration](https://github.com/tf-landingzone/aws-lz-platform/tree/main/config): `config`
- [Landing-zone variables](https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/generate_landing_zone_tfvars.py): `scripts/generate_landing_zone_tfvars.py`
- [Stack variables](https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/generate_stack_tfvars.py): `scripts/generate_stack_tfvars.py`

### Landing Zone Platform

- [Bootstrap stack](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/00-bootstrap): `stacks/00-bootstrap`
- [Organizations](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/01-organizations): `stacks/01-organizations`
- [Security](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/02-security): `stacks/02-security`
- [Networking](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/03-networking): `stacks/03-networking`
- [Logging](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/04-logging): `stacks/04-logging`
- [Operations](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/05-operations): `stacks/05-operations`
- [Workload support](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/06-workload-support): `stacks/06-workload-support`
- [Landing-zone orchestrator](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/landing-zone): `stacks/landing-zone`
- [Permission sets](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/permission-sets): `stacks/permission-sets`

### Account Operations

- [Account setup](https://github.com/tf-landingzone/aws-lz-platform/tree/main/stacks/account-setup): `stacks/account-setup`
- [Fleet deployer](https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/deploy_accounts.py): `scripts/deploy_accounts.py`
- [Pipeline launcher](https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/sfn_launcher.py): `scripts/sfn_launcher.py`
- [Drift report](https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/generate_drift_report.py): `scripts/generate_drift_report.py`

### Shared Runtime

- [HCL writer](https://github.com/tf-landingzone/aws-lz-platform/blob/main/scripts/hcl_writer.py): `scripts/hcl_writer.py`
- **Deployment run state**

### Other components

- **Platform operator**
- **AWS Step Functions**
- **AWS S3**

## Connections

- Platform operator → YAML configuration: edits (evidence: `README.md`)
- YAML configuration → Landing-zone variables: configures (evidence: `README.md`)
- YAML configuration → Stack variables: configures (evidence: `README.md`)
- Landing-zone variables → HCL writer: calls (evidence: `scripts/generate_landing_zone_tfvars.py`)
- Stack variables → HCL writer: uses (evidence: `scripts/generate_stack_tfvars.py`)
- Landing-zone variables → Landing-zone orchestrator: writes variables (evidence: `scripts/generate_landing_zone_tfvars.py`)
- Stack variables → Organizations: generates variables (evidence: `README.md`)
- Stack variables → Security: generates variables (evidence: `README.md`)
- Stack variables → Networking: generates variables (evidence: `README.md`)
- Stack variables → Logging: generates variables (evidence: `README.md`)
- Stack variables → Operations: generates variables (evidence: `README.md`)
- Stack variables → Workload support: generates variables (evidence: `scripts/generate_stack_tfvars.py`)
- Platform operator → Bootstrap stack: applies first (evidence: `README.md`)
- Landing-zone orchestrator → Organizations: orchestrates (evidence: `README.md`)
- Landing-zone orchestrator → Security: orchestrates (evidence: `README.md`)
- Landing-zone orchestrator → Networking: orchestrates (evidence: `README.md`)
- Landing-zone orchestrator → Logging: orchestrates (evidence: `README.md`)
- Landing-zone orchestrator → Operations: orchestrates (evidence: `README.md`)
- Landing-zone orchestrator → Workload support: orchestrates (evidence: `README.md`)
- Platform operator → Permission sets: deploys (evidence: `README.md`)
- Platform operator → Fleet deployer: runs (evidence: `scripts/deploy_accounts.py`)
- Fleet deployer → Account setup: plans and applies (evidence: `scripts/deploy_accounts.py`)
- Fleet deployer → Deployment run state: reads and writes (evidence: `scripts/deploy_accounts.py`)
- Fleet deployer → Drift report: produces report for (evidence: `scripts/generate_drift_report.py`)
- Platform operator → Pipeline launcher: launches (evidence: `scripts/sfn_launcher.py`)
- Pipeline launcher → AWS S3: uploads manifest (evidence: `scripts/sfn_launcher.py`)
- Pipeline launcher → AWS Step Functions: starts execution (evidence: `scripts/sfn_launcher.py`)
- Platform operator → Account setup: provisions account (evidence: `README.md`)
