# ummeyhp/terraform-example-foundation architecture

> Architecture diagram of the GitHub repository ummeyhp/terraform-example-foundation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ummeyhp/terraform-example-foundation
- Repository: https://github.com/ummeyhp/terraform-example-foundation

## Overview

This repository is a Terraform example foundation for building a secure Google Cloud organization. An operator applies separate Terraform projects in sequence: bootstrap establishes state and deployment permissions; organization and environment stages create shared and environment-scoped resources; networking provides alternative dual Shared VPC or hub-and-spoke designs; project and app-infrastructure stages extend the foundation for workloads. The README excerpt documents the early-stage sequence and major capabilities, but no source excerpts were supplied, so internal module calls and later-stage dependencies are not asserted.

Main entry points: [`0-bootstrap`](https://github.com/ummeyhp/terraform-example-foundation/tree/master/0-bootstrap) (Bootstrap), [`1-org/envs/shared`](https://github.com/ummeyhp/terraform-example-foundation/tree/master/1-org/envs/shared) (Organization resources), [`0-bootstrap/main.tf`](https://github.com/ummeyhp/terraform-example-foundation/blob/master/0-bootstrap/main.tf) (Terraform state and IAM), [`0-bootstrap/cb.tf`](https://github.com/ummeyhp/terraform-example-foundation/blob/master/0-bootstrap/cb.tf) (Deployment pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundation["Foundation setup"]
  node_bootstrap["Bootstrap"]
  node_seed[("Terraform state and IAM<br/>[main.tf]")]
  node_cicd["Deployment pipeline<br/>[cb.tf]"]
end

subgraph group_governance["Organization governance"]
  node_org["Organization resources"]
  node_logging["Central logging"]
  node_envs["Environment baseline"]
  node_envbaseline["Environment services"]
end

subgraph group_networks["Network designs"]
  node_dual["Dual Shared VPC"]
  node_dualmodules["Dual network modules"]
  node_hubspoke["Hub-and-spoke"]
  node_hubmodules["Hub-and-spoke modules"]
end

subgraph group_workloads["Workload infrastructure"]
  node_projects["Business-unit projects"]
  node_projectmodules["Project modules"]
  node_appinfra["Application infrastructure"]
  node_appmodule["Application baseline"]
end

node_operator(("Foundation operator"))

node_operator -->|"runs manually"| node_bootstrap
node_bootstrap -->|"creates state"| node_seed
node_bootstrap -->|"sets up pipeline"| node_cicd
node_bootstrap -->|"precedes"| node_org
node_org -->|"precedes"| node_envs

click node_bootstrap "https://github.com/ummeyhp/terraform-example-foundation/tree/master/0-bootstrap"
click node_seed "https://github.com/ummeyhp/terraform-example-foundation/blob/master/0-bootstrap/main.tf"
click node_cicd "https://github.com/ummeyhp/terraform-example-foundation/blob/master/0-bootstrap/cb.tf"
click node_org "https://github.com/ummeyhp/terraform-example-foundation/tree/master/1-org/envs/shared"
click node_logging "https://github.com/ummeyhp/terraform-example-foundation/tree/master/1-org/modules/centralized-logging"
click node_envs "https://github.com/ummeyhp/terraform-example-foundation/tree/master/2-environments/envs"
click node_envbaseline "https://github.com/ummeyhp/terraform-example-foundation/tree/master/2-environments/modules/env_baseline"
click node_dual "https://github.com/ummeyhp/terraform-example-foundation/tree/master/3-networks-dual-svpc"
click node_dualmodules "https://github.com/ummeyhp/terraform-example-foundation/tree/master/3-networks-dual-svpc/modules"
click node_hubspoke "https://github.com/ummeyhp/terraform-example-foundation/tree/master/3-networks-hub-and-spoke"
click node_hubmodules "https://github.com/ummeyhp/terraform-example-foundation/tree/master/3-networks-hub-and-spoke/modules"
click node_projects "https://github.com/ummeyhp/terraform-example-foundation/tree/master/4-projects"
click node_projectmodules "https://github.com/ummeyhp/terraform-example-foundation/tree/master/4-projects/modules"
click node_appinfra "https://github.com/ummeyhp/terraform-example-foundation/tree/master/5-app-infra"
click node_appmodule "https://github.com/ummeyhp/terraform-example-foundation/tree/master/5-app-infra/modules/env_base"

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_seed,node_cicd toneBlue
class node_org,node_logging,node_envs,node_envbaseline toneAmber
class node_dual,node_dualmodules,node_hubspoke,node_hubmodules toneMint
class node_projects,node_projectmodules,node_appinfra,node_appmodule toneRose
class node_operator toneIndigo
```

## Components

### Foundation setup

- [Bootstrap](https://github.com/ummeyhp/terraform-example-foundation/tree/master/0-bootstrap): `0-bootstrap`
- [Terraform state and IAM](https://github.com/ummeyhp/terraform-example-foundation/blob/master/0-bootstrap/main.tf): `0-bootstrap/main.tf`
- [Deployment pipeline](https://github.com/ummeyhp/terraform-example-foundation/blob/master/0-bootstrap/cb.tf): `0-bootstrap/cb.tf`

### Organization governance

- [Organization resources](https://github.com/ummeyhp/terraform-example-foundation/tree/master/1-org/envs/shared): `1-org/envs/shared`
- [Central logging](https://github.com/ummeyhp/terraform-example-foundation/tree/master/1-org/modules/centralized-logging): `1-org/modules/centralized-logging`
- [Environment baseline](https://github.com/ummeyhp/terraform-example-foundation/tree/master/2-environments/envs): `2-environments/envs`
- [Environment services](https://github.com/ummeyhp/terraform-example-foundation/tree/master/2-environments/modules/env_baseline): `2-environments/modules/env_baseline`

### Network designs

- [Dual Shared VPC](https://github.com/ummeyhp/terraform-example-foundation/tree/master/3-networks-dual-svpc): `3-networks-dual-svpc`
- [Dual network modules](https://github.com/ummeyhp/terraform-example-foundation/tree/master/3-networks-dual-svpc/modules): `3-networks-dual-svpc/modules`
- [Hub-and-spoke](https://github.com/ummeyhp/terraform-example-foundation/tree/master/3-networks-hub-and-spoke): `3-networks-hub-and-spoke`
- [Hub-and-spoke modules](https://github.com/ummeyhp/terraform-example-foundation/tree/master/3-networks-hub-and-spoke/modules): `3-networks-hub-and-spoke/modules`

### Workload infrastructure

- [Business-unit projects](https://github.com/ummeyhp/terraform-example-foundation/tree/master/4-projects): `4-projects`
- [Project modules](https://github.com/ummeyhp/terraform-example-foundation/tree/master/4-projects/modules): `4-projects/modules`
- [Application infrastructure](https://github.com/ummeyhp/terraform-example-foundation/tree/master/5-app-infra): `5-app-infra`
- [Application baseline](https://github.com/ummeyhp/terraform-example-foundation/tree/master/5-app-infra/modules/env_base): `5-app-infra/modules/env_base`

### Other components

- **Foundation operator**

## Connections

- Foundation operator → Bootstrap: runs manually (evidence: `README.md`)
- Bootstrap → Terraform state and IAM: creates state (evidence: `README.md`)
- Bootstrap → Deployment pipeline: sets up pipeline (evidence: `README.md`)
- Bootstrap → Organization resources: precedes (evidence: `README.md`)
- Organization resources → Environment baseline: precedes (evidence: `README.md`)
