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 change | Repo |
|---|---|
Routing of magic.7mind.* or app.7mind.*, CloudFront path behaviours, Kong routes, Lambda env vars, the catalogue builder | Gymondo-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 monitors | sevenmind/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 settings | Cloudflare dashboard (not in Terraform) |
sevenmind/infrastructure (legacy)
- Layout:
foundation/(GKEapplication-cluster, Cloud SQL, ingress, Datadog, the Rudderstack proxy, domains, ZPP cert generator, 7Sleep identity),cloudflare/(zones6mind_de,6sleep_de,7mind_de,7sleep_de, and page rules for7mind_nl),global/(Postgres instances, Vault storage, AWS backup),staging/andproduction/(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, prefixterraform/state/<target>. - Versions: Terraform 1.9.3; Google provider
~> 6.49; Cloudflare provider~> 3.0incloudflare/. - Applying: by hand with
just apply <target>after a reviewed PR.staging/andproduction/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/productionandterraform/environment/staging, both usingterraform/modules/backend(deployment, ingresses, config maps, secrets, Pub/Sub topics and subscriptions, Datadog monitors, service account). - State: GCS bucket
7mind-terraform, prefixstate/backend/<environment>. - Applying: from CI.
deploy-to-production.ymlruns 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.mdand 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, includingsevenmind-legacy-gateway; the vendor mapsevenmind -> app.7mind.de),service-cloudfront(the 7Mind CNAMEs and thesevenmind_gateway_path_patternsbehaviours),app-sevenmind-catalogue-builder(the Elixir content Lambda and its S3 bucket). - Per-environment values in
service-test.tfvarsandservice-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.
Related
- infra-overview — the overall topology
- cloudflare — DNS and the website
- google-cloud — what the legacy repos still manage
- elixir-backend — the service the backend repo’s Terraform deploys
- gymondo-platform — what the Gymondo repo manages