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.

  • Terraform
  • GitHub Actions
  • HashiCorp Vault
  • Azure AKS
  • CAST AI
  • FluxCD
  • Apps Script
  • Python
  • TFLint
  • Checkov

// 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

From Form to Running Cluster: Self-Service Team Onboarding flow1. Form submit → 2. Validate → 3. CSV to Git → 4. Populate Vault → 5. Subscriptions → 6. Onboard → 7. Gate: real apply → 8. Autoscaling → 9. Gate: GitOps flag → 10. GitOps bootstrap01Form submit02Validate03CSV to Git04Populate Vault05Subscriptions06Onboard07 · GATEGate: real apply08Autoscaling09 · GATEGate: GitOps flag10GitOps bootstrap
  1. Form submitteam name, short name, environment (lower, upper or both), region, resource checkboxes, HA and mesh mode
  2. ValidateApps Script enforces naming rules and auto-enables dependencies (a cluster implies a VNet)
  3. CSV to Gitresponses become a two-column CSV; a workflow dispatch starts the pipeline
  4. Populate Vaultdefaults, then team overrides, then computed values such as network blocks
  5. SubscriptionsTerraform creates lower and upper subscriptions and stores their ids
  6. Onboardreusable Terraform workflow builds the network, cluster and identities from about 100 config keys
  7. Gate: real apply gatenext stage fires only on a non-empty apply with the right flags set
  8. Autoscalingcluster registered with the cost-optimisation platform
  9. Gate: GitOps flag gatebootstrap runs only if required, a cluster exists and it is not the HA secondary
  10. 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.

// Related