Summary: 7Mind infrastructure is described in three Terraform locations: sevenmind/infrastructure for the legacy Google Cloud foundation and Cloudflare, the terraform/ folder of sevenmind/backend for the Elixir backend’s own deployment on GKE, and Gymondo-git/terraform for everything 7Mind runs on the Gymondo platform since 2026-09-14. Sources: direct inspection of sevenmind/infrastructure (README.md, */backend.tf, */versions.tf, foundation/, cloudflare/, git log and branches); Gymondo-git/terraform (workspaces apps, service-cloudfront, app-sevenmind-catalogue-builder) via GitHub; sevenmind/backend origin/main read on 2026-11-09 (terraform/environment/, terraform/modules/backend/, RETIRED.md, .github/workflows/deploy-to-production.yml and reusable-terraform-deploy-to.yml); infrastructure branch list on 2026-11-09 Last updated: 2026-11-09


Which repo to change

You want to changeRepo
Routing of magic.7mind.* or app.7mind.*, CloudFront path behaviours, Kong routes, Lambda env vars, the catalogue builderGymondo-git/terraform (platform team owns it)
The Elixir backend’s Kubernetes deployment and ingresses (magic, gateway, backend and the 7Sleep hosts), its Pub/Sub topics and subscriptions, its Datadog monitorssevenmind/backend, folder terraform/
Cloudflare DNS records and zones, the website’s Cloudflare setup, the GCP foundation (GKE cluster, Cloud SQL, ingress, the rs.7mind.de RudderStack proxy, ZPP certificate generator, Vault) and the older Pub/Sub targets in staging/ and production/sevenmind/infrastructure
The website’s Cloudflare Pages project settingsCloudflare dashboard (not in Terraform)

sevenmind/infrastructure (legacy)

  • Layout: foundation/ (GKE application-cluster, Cloud SQL, ingress, Datadog, the Rudderstack proxy, domains, ZPP cert generator, 7Sleep identity), cloudflare/ (zones 6mind_de, 6sleep_de, 7mind_de, 7sleep_de, and page rules for 7mind_nl), global/ (Postgres instances, Vault storage, AWS backup), staging/ and production/ (databases, IAM, Pub/Sub, secrets, web-v2, ZPP cert generator), analytics/, modules/ (cloudsql_db, cloudsql_user, pubsub_sub, pubsub_topic, vault_service).
  • State: GCS bucket 7mind-infrastructure, prefix terraform/state/<target>.
  • Versions: Terraform 1.9.3; Google provider ~> 6.49; Cloudflare provider ~> 3.0 in cloudflare/.
  • Applying: by hand with just apply <target> after a reviewed PR. staging/ and production/ also write to a self-hosted Vault in the cluster, which needs a port-forward (just login-vault). Credentials come from 1Password, GCP application default login, Datadog and Cloudflare tokens.
  • Only resources created after August 2022 are in code; older ones were made in the console.

Drift warning: the repo still declares magic, backend, rs, panel.backend and id as CNAMEs to the GKE cluster. The magic.* records were repointed to the Gymondo CloudFront edge outside Terraform during the migration, and the old www CNAME to the cluster was also removed outside Terraform. Running a plan or apply on the DNS targets without reconciling first would try to point magic.* back at GKE and break every 7Mind client. The website migration Worker was never merged to main: its Terraform lives only on the pushed branches chore/rename-migration-proxy (last commit 2026-07-14) and feature/mind-650-magazin-staging-worker. Some changes on this repo are made out of band and committed afterwards, for example the staging ZPP certificate generator deleted on 2026-10-08, because this repo has no apply step in CI.

sevenmind/backend terraform/

  • Roots: terraform/environment/production and terraform/environment/staging, both using terraform/modules/backend (deployment, ingresses, config maps, secrets, Pub/Sub topics and subscriptions, Datadog monitors, service account).
  • State: GCS bucket 7mind-terraform, prefix state/backend/<environment>.
  • Applying: from CI. deploy-to-production.yml runs on every published GitHub Release, builds the image and applies the production root (reusable-terraform-deploy-to.yml).
  • Staging is retired. The staging root was destroyed on 2026-10-07 (193 resources) and its deploy workflow deleted; the root is kept so the destroy can be reversed. See terraform/environment/staging/RETIRED.md and elixir-backend.

Gymondo-git/terraform

  • One workspace per concern. The ones that matter for 7Mind: apps (every Lambda, its Kong routes, SNS/SQS wiring and env vars, including sevenmind-legacy-gateway; the vendor map sevenmind -> app.7mind.de), service-cloudfront (the 7Mind CNAMEs and the sevenmind_gateway_path_patterns behaviours), app-sevenmind-catalogue-builder (the Elixir content Lambda and its S3 bucket).
  • Per-environment values in service-test.tfvars and service-prod.tfvars.
  • Applied by hand per workspace with make. Deploying a Lambda’s code does not apply its Terraform; route and env var changes need a separate apply.
  • See gymondo-platform for the platform this describes.