# futurice/terraform-examples architecture

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

- Interactive diagram: https://gitdiagram.com/futurice/terraform-examples
- Repository: https://github.com/futurice/terraform-examples

## Overview

This repository is a collection of copyable Terraform recipes for deploying cloud architectures. The principal workflow is: an engineer selects a recipe, adapts its variables and configuration, and applies Terraform to provision the demonstrated platform and workload. Major stages include recipe discovery, infrastructure provisioning, application exposure, persistence or messaging, and operational integrations. The graph emphasizes documented AWS, Azure, and Google Cloud capabilities plus sampled runtime behavior; some recipe relationships remain intentionally broad because most Terraform source was not sampled.

Main entry points: [`google_cloud/CQRS_bigquery_memorystore`](https://github.com/futurice/terraform-examples/tree/master/google_cloud/CQRS_bigquery_memorystore) (CQRS Pipeline), [`google_cloud/CQRS_bigquery_memorystore/functions/src/materialize/index.js`](https://github.com/futurice/terraform-examples/blob/master/google_cloud/CQRS_bigquery_memorystore/functions/src/materialize/index.js) (Materialize Function), [`google_cloud/CQRS_bigquery_memorystore/functions/src/memorystoreload/index.js`](https://github.com/futurice/terraform-examples/blob/master/google_cloud/CQRS_bigquery_memorystore/functions/src/memorystoreload/index.js) (Memorystore Loader), [`aws/aws_lambda_api`](https://github.com/futurice/terraform-examples/tree/master/aws/aws_lambda_api) (Lambda API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Recipe Catalog"]
  node_recipes["Terraform Recipes"]
end

subgraph group_aws["AWS Recipes"]
  node_aws_lambda_api["Lambda API"]
  node_aws_lambda_cronjob["Lambda Cronjob"]
  node_aws_reverse_proxy["Reverse Proxy"]
  node_aws_static_site["Static Site"]
  node_aws_wordpress["WordPress Fargate"]
  node_aws_msk["VPC MSK"]
end

subgraph group_azure["Azure Recipes"]
  node_azure_app_service["Docker App Service"]
  node_azure_layers["Azure Layers"]
end

subgraph group_gcp["Google Cloud Recipes"]
  node_gcp_cqrs["CQRS Pipeline"]
  node_gcp_camunda["Camunda Workflow"]
  node_gcp_camunda_secure["Secure Camunda"]
  node_gcp_oathkeeper["Oathkeeper Proxy"]
  node_gcp_openresty["OpenResty Proxy"]
  node_gcp_minecraft["Minecraft Server"]
end

subgraph group_runtime["Runtime Integrations"]
  node_materialize["Materialize Function<br/>[index.js]"]
  node_probe["Probe Function<br/>[index.js]"]
  node_memorystore_loader["Memorystore Loader<br/>[index.js]"]
  node_edge_auth["Edge Auth Handler<br/>[lambda.tpl.js]"]
end

node_engineer(("Engineer"))
node_api_gateway["API Gateway"]
node_cloudfront["CloudFront"]
node_bigquery[("BigQuery")]
node_cloud_storage[("Cloud Storage")]
node_memorystore[("Cloud Memorystore")]
node_application_insights["Application Insights"]

node_engineer -->|"selects recipe"| node_recipes
node_recipes -->|"guides deployment"| node_aws_lambda_api
node_recipes -->|"guides deployment"| node_aws_lambda_cronjob
node_recipes -->|"guides deployment"| node_aws_reverse_proxy
node_recipes -->|"guides deployment"| node_aws_static_site
node_recipes -->|"guides deployment"| node_aws_wordpress
node_recipes -->|"guides deployment"| node_aws_msk
node_recipes -->|"guides deployment"| node_azure_app_service
node_recipes -->|"guides deployment"| node_azure_layers
node_recipes -->|"guides deployment"| node_gcp_cqrs
node_recipes -->|"guides deployment"| node_gcp_camunda
node_recipes -->|"guides deployment"| node_gcp_camunda_secure
node_recipes -->|"guides deployment"| node_gcp_oathkeeper
node_recipes -->|"guides deployment"| node_gcp_openresty
node_recipes -->|"guides deployment"| node_gcp_minecraft
node_aws_lambda_api -->|"provisions endpoint"| node_api_gateway
node_aws_reverse_proxy -->|"provisions distribution"| node_cloudfront
node_cloudfront -->|"dispatches request"| node_edge_auth
node_edge_auth -->|"returns response"| node_cloudfront
node_gcp_cqrs -->|"deploys function"| node_materialize
node_materialize -->|"queries tables"| node_bigquery
node_materialize -->|"exports JSON"| node_cloud_storage
node_gcp_cqrs -->|"deploys function"| node_probe
node_probe -->|"writes activity"| node_bigquery
node_gcp_cqrs -->|"deploys function"| node_memorystore_loader
node_cloud_storage -->|"triggers loader"| node_memorystore_loader
node_memorystore_loader -->|"writes records"| node_memorystore
node_azure_app_service -.->|"emits telemetry"| node_application_insights

click node_aws_lambda_api "https://github.com/futurice/terraform-examples/tree/master/aws/aws_lambda_api"
click node_aws_lambda_cronjob "https://github.com/futurice/terraform-examples/tree/master/aws/aws_lambda_cronjob"
click node_aws_reverse_proxy "https://github.com/futurice/terraform-examples/tree/master/aws/aws_reverse_proxy"
click node_aws_static_site "https://github.com/futurice/terraform-examples/tree/master/aws/aws_static_site"
click node_aws_wordpress "https://github.com/futurice/terraform-examples/tree/master/aws/wordpress_fargate"
click node_aws_msk "https://github.com/futurice/terraform-examples/tree/master/aws/aws_vpc_msk"
click node_azure_app_service "https://github.com/futurice/terraform-examples/tree/master/azure/azure_linux_docker_app_service"
click node_azure_layers "https://github.com/futurice/terraform-examples/tree/master/azure/layers"
click node_gcp_cqrs "https://github.com/futurice/terraform-examples/tree/master/google_cloud/CQRS_bigquery_memorystore"
click node_gcp_camunda "https://github.com/futurice/terraform-examples/tree/master/google_cloud/camunda"
click node_gcp_camunda_secure "https://github.com/futurice/terraform-examples/tree/master/google_cloud/camunda-secure"
click node_gcp_oathkeeper "https://github.com/futurice/terraform-examples/tree/master/google_cloud/oathkeeper"
click node_gcp_openresty "https://github.com/futurice/terraform-examples/tree/master/google_cloud/openresty-beyondcorp"
click node_gcp_minecraft "https://github.com/futurice/terraform-examples/tree/master/google_cloud/minecraft"
click node_materialize "https://github.com/futurice/terraform-examples/blob/master/google_cloud/CQRS_bigquery_memorystore/functions/src/materialize/index.js"
click node_probe "https://github.com/futurice/terraform-examples/blob/master/google_cloud/CQRS_bigquery_memorystore/functions/src/probe/index.js"
click node_memorystore_loader "https://github.com/futurice/terraform-examples/blob/master/google_cloud/CQRS_bigquery_memorystore/functions/src/memorystoreload/index.js"
click node_edge_auth "https://github.com/futurice/terraform-examples/blob/master/aws/aws_reverse_proxy/lambda.tpl.js"

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_recipes toneBlue
class node_aws_lambda_api,node_aws_lambda_cronjob,node_aws_reverse_proxy,node_aws_static_site,node_aws_wordpress,node_aws_msk,node_bigquery,node_cloud_storage,node_memorystore toneAmber
class node_azure_app_service,node_azure_layers,node_api_gateway toneMint
class node_gcp_cqrs,node_gcp_camunda,node_gcp_camunda_secure,node_gcp_oathkeeper,node_gcp_openresty,node_gcp_minecraft toneRose
class node_materialize,node_probe,node_memorystore_loader,node_edge_auth,node_engineer,node_cloudfront,node_application_insights toneIndigo
```

## Components

### Recipe Catalog

- **Terraform Recipes**

### AWS Recipes

- [Lambda API](https://github.com/futurice/terraform-examples/tree/master/aws/aws_lambda_api): `aws/aws_lambda_api`
- [Lambda Cronjob](https://github.com/futurice/terraform-examples/tree/master/aws/aws_lambda_cronjob): `aws/aws_lambda_cronjob`
- [Reverse Proxy](https://github.com/futurice/terraform-examples/tree/master/aws/aws_reverse_proxy): `aws/aws_reverse_proxy`
- [Static Site](https://github.com/futurice/terraform-examples/tree/master/aws/aws_static_site): `aws/aws_static_site`
- [WordPress Fargate](https://github.com/futurice/terraform-examples/tree/master/aws/wordpress_fargate): `aws/wordpress_fargate`
- [VPC MSK](https://github.com/futurice/terraform-examples/tree/master/aws/aws_vpc_msk): `aws/aws_vpc_msk`

### Azure Recipes

- [Docker App Service](https://github.com/futurice/terraform-examples/tree/master/azure/azure_linux_docker_app_service): `azure/azure_linux_docker_app_service`
- [Azure Layers](https://github.com/futurice/terraform-examples/tree/master/azure/layers): `azure/layers`

### Google Cloud Recipes

- [CQRS Pipeline](https://github.com/futurice/terraform-examples/tree/master/google_cloud/CQRS_bigquery_memorystore): `google_cloud/CQRS_bigquery_memorystore`
- [Camunda Workflow](https://github.com/futurice/terraform-examples/tree/master/google_cloud/camunda): `google_cloud/camunda`
- [Secure Camunda](https://github.com/futurice/terraform-examples/tree/master/google_cloud/camunda-secure): `google_cloud/camunda-secure`
- [Oathkeeper Proxy](https://github.com/futurice/terraform-examples/tree/master/google_cloud/oathkeeper): `google_cloud/oathkeeper`
- [OpenResty Proxy](https://github.com/futurice/terraform-examples/tree/master/google_cloud/openresty-beyondcorp): `google_cloud/openresty-beyondcorp`
- [Minecraft Server](https://github.com/futurice/terraform-examples/tree/master/google_cloud/minecraft): `google_cloud/minecraft`

### Runtime Integrations

- [Materialize Function](https://github.com/futurice/terraform-examples/blob/master/google_cloud/CQRS_bigquery_memorystore/functions/src/materialize/index.js): `google_cloud/CQRS_bigquery_memorystore/functions/src/materialize/index.js`
- [Probe Function](https://github.com/futurice/terraform-examples/blob/master/google_cloud/CQRS_bigquery_memorystore/functions/src/probe/index.js): `google_cloud/CQRS_bigquery_memorystore/functions/src/probe/index.js`
- [Memorystore Loader](https://github.com/futurice/terraform-examples/blob/master/google_cloud/CQRS_bigquery_memorystore/functions/src/memorystoreload/index.js): `google_cloud/CQRS_bigquery_memorystore/functions/src/memorystoreload/index.js`
- [Edge Auth Handler](https://github.com/futurice/terraform-examples/blob/master/aws/aws_reverse_proxy/lambda.tpl.js): `aws/aws_reverse_proxy/lambda.tpl.js`

### Other components

- **Engineer**
- **API Gateway**
- **CloudFront**
- **BigQuery**
- **Cloud Storage**
- **Cloud Memorystore**
- **Application Insights**

## Connections

- Engineer → Terraform Recipes: selects recipe
- Terraform Recipes → Lambda API: guides deployment
- Terraform Recipes → Lambda Cronjob: guides deployment
- Terraform Recipes → Reverse Proxy: guides deployment
- Terraform Recipes → Static Site: guides deployment
- Terraform Recipes → WordPress Fargate: guides deployment
- Terraform Recipes → VPC MSK: guides deployment
- Terraform Recipes → Docker App Service: guides deployment
- Terraform Recipes → Azure Layers: guides deployment
- Terraform Recipes → CQRS Pipeline: guides deployment
- Terraform Recipes → Camunda Workflow: guides deployment
- Terraform Recipes → Secure Camunda: guides deployment
- Terraform Recipes → Oathkeeper Proxy: guides deployment
- Terraform Recipes → OpenResty Proxy: guides deployment
- Terraform Recipes → Minecraft Server: guides deployment
- Lambda API → API Gateway: provisions endpoint
- Reverse Proxy → CloudFront: provisions distribution
- CloudFront → Edge Auth Handler: dispatches request
- Edge Auth Handler → CloudFront: returns response
- CQRS Pipeline → Materialize Function: deploys function
- Materialize Function → BigQuery: queries tables
- Materialize Function → Cloud Storage: exports JSON
- CQRS Pipeline → Probe Function: deploys function
- Probe Function → BigQuery: writes activity
- CQRS Pipeline → Memorystore Loader: deploys function
- Cloud Storage → Memorystore Loader: triggers loader
- Memorystore Loader → Cloud Memorystore: writes records
- Docker App Service → Application Insights: emits telemetry
