Platform · Flagship pipeline
From Form to Running Cluster: Self-Service Team Onboarding
A form submission becomes Vault config, cloud subscriptions, a landing zone with Kubernetes, cost-aware autoscaling and a GitOps control plane, with each stage firing the next.
// Overview
Internal teams request an isolated cloud environment through a form. Apps Script validates the input and commits a key/value CSV to Git, which starts a parent GitHub Actions workflow. That workflow populates Vault, creates subscriptions and calls the onboarding Terraform. Terraform then dispatches the autoscaling stage, which dispatches the GitOps bootstrap stage. The operator docs budget roughly half an hour end to end.
// The problem
Hand-building per-team subscriptions, networks, clusters, autoscaling and GitOps wiring is slow, inconsistent and error-prone. One request now yields deterministic naming, non-overlapping network allocation and standard defaults.
// Flow
- Form submitteam name, short name, environment (lower, upper or both), region, resource checkboxes, HA and mesh mode
- ValidateApps Script enforces naming rules and auto-enables dependencies (a cluster implies a VNet)
- CSV to Gitresponses become a two-column CSV; a workflow dispatch starts the pipeline
- Populate Vaultdefaults, then team overrides, then computed values such as network blocks
- SubscriptionsTerraform creates lower and upper subscriptions and stores their ids
- Onboardreusable Terraform workflow builds the network, cluster and identities from about 100 config keys
- Gate: real apply gatenext stage fires only on a non-empty apply with the right flags set
- Autoscalingcluster registered with the cost-optimisation platform
- Gate: GitOps flag gatebootstrap runs only if required, a cluster exists and it is not the HA secondary
- GitOps bootstrapFlux installed; the cluster reconciles itself from Git
// Design decisions & guardrails
- Stages are chained by Terraform dispatching the next workflow, not by job dependencies, so a failed stage stops the chain and can be re-run alone.
- Every stage takes Plan or Plan and Apply; applies are bound to a protected environment where required reviewers are the real approval gate.
- Terraform reads all configuration from Vault with no hardcoded defaults for required values: a missing key fails the plan loudly.
- Network ranges are allocated through an auto-merged pull request so two teams can never receive the same block.
- Per-team concurrency groups prevent overlapping runs; subscriptions for both environments live in one state.
- Golden rules in the operator guide: read before write, plan before apply, never apply from a laptop, update docs in the same change.
- Honest limitation, documented: there is no true end-to-end plan, because downstream stages can only plan against state the upstream apply creates.
// Outcome
Six stages, about 100 config keys read and about 73 result keys written back per environment, replacing a multi-day manual runbook.