MBMadhav Bhasininblog.madhav.dev·1d ago · 5 min readTerraform CI/CD: Plan on PR, Apply on MergeThe pipeline ran terraform apply against a saved plan file. What it didn't account for: another engineer had merged a change to the same module forty minutes earlier. The plan was generated before tha00
MBMadhav Bhasininblog.madhav.dev·4d ago · 6 min readProvisioning GCP Services with Terraform: Cloud Run, Pub/Sub, and Cloud SQLThe Cloud Run service had been scaled to zero for eleven days before anyone noticed. min_instance_count was set to 0 in the Terraform config — correct for dev, copied unchanged into prod. Cold start l10
MBMadhav Bhasininblog.madhav.dev·6d ago · 6 min readManaging State, Secrets, and Environments in TerraformThe engineer who set up the Terraform project had left the company three months earlier. Nobody had thought to ask where the state file lived. It lived on their laptop. Which IT had wiped. Re-importin00
MBMadhav Bhasininblog.madhav.dev·Sep 8 · 7 min readStructuring OpenAI and Gemini Calls in FastAPI: Prompts, Fallbacks, and RetriesThe fallback was supposed to be temporary. When the OpenAI API was unavailable, the service would return the last cached result for that user rather than failing the request. Clean degraded experience00
MBMadhav Bhasininblog.madhav.dev·Sep 1 · 6 min readPostgreSQL Connection Pooling on Cloud Run: The Problem Nobody Warns You AboutCloud Run scales horizontally. That's the point. Under load, it spins up new instances automatically — each one handling concurrent requests, each one maintaining its own connection pool to your Cloud30