Skip to content
All work
Case study 09Staging live

BloomingBet infrastructure

Google Cloud for BloomingBet: a GKE Autopilot staging environment in Terraform, and a Cloud Run plan for the first thousand users.

RoleCloud engineer
Year2026
AreaCloud · Google Cloud
Stack
Google CloudTerraformGKECloud RunCloud SQLKubernetes

The brief

BloomingBet’s staging environment was first built by hand with gcloud. I moved it into Terraform and Kubernetes manifests, and planned what production would look like at a thousand registered users.

What I built

Staging on GKE Autopilot. The network, NAT, Cloud SQL instances, Artifact Registry, certificates, Workload Identity service accounts and Secret Manager containers are all in Terraform. Redis and Kafka are Kubernetes manifests, with a Redis per product.

Adopting what already existed. Because the environment predated the code, the first Terraform run imports every resource. The rule was zero creates, zero destroys and no replacements, and any resource that wanted replacing meant the config was wrong, not that I should apply it.

Secrets kept out of state. Terraform manages only the secret containers and the SQL users, with passwords ignored. Values go in with gcloud secrets versions add.

Deploys. Cloud Build deploys each image by commit SHA and moves the latest tag only after the rollout succeeds. Rollback is re-running the older build or pointing latest back.

The Cloud Run plan. A second Terraform stack describes phase one: ten services in four Cloud Run groups behind one global load balancer, Cloud SQL for MySQL and Postgres, Memorystore Redis, Cloud Storage, and Cloud NAT with two static IPs that payment providers can allow-list. Moving to ten thousand users means copying a tfvars file and changing sizes.

Where it stands

Staging is live. The Cloud Run stack is written but not applied yet.

How it fits together

The system, in 3D

Services: Load balancer, GKE Autopilot, Cloud SQL, Redis, Secret Manager. Connections: Load balancer to GKE Autopilot; GKE Autopilot to Cloud SQL; GKE Autopilot to Redis; Secret Manager to GKE Autopilot.
Load balancer
GKE Autopilot
Cloud SQL
Redis
Secret Manager
Next project
10Acumen DigitalMobile engineer2024 — 2026