Platform · Earlier generation
Five-Minute Customer Onboarding: Forms, Workspaces and a Subnet Allocator
The earlier generation of the pipeline: form submissions picked up by a scheduled workflow that creates workspaces and config per customer.
// Overview
Customer requests are submitted by form, transposed by Apps Script and committed. A scheduled job merges them with standard keys, creates Terraform Cloud workspaces and allocates the first free pre-created subnet from a CSV inventory. Lower auto-applies; upper waits for approval and notifies chat. A clean-up form returns subnets and removes config.
// The problem
Repeatable multi-project customer environments with shared-VPC subnet assignment, with no human in the repetitive path.
// Flow
- Form submita trigger fires Apps Script
- Transpose and commitsheet to rows, pushed to an inputs folder
- Scheduled pick-upworkflow every 5 minutes in an active window
- Mergecustomer inputs plus standard keys
- Allocatefirst available subnet per region from the inventory, marked used
- Create workspaceworkspace and config written
- Gate: environment policy gatelower auto-applies, upper needs approval
- Archiveinputs archived per customer
- Clean-up formmesh cleanup, destroy, release subnets, delete config
// Design decisions & guardrails
- Auto-apply is off in upper environments.
- Availability flags prevent subnet reuse; the pipeline fails fast if no subnet is free for a region.
- Clean-up runs in its own window every 15 minutes.
- Required environment variables are checked at start.
// Outcome
The prototype that proved the model later rebuilt on Azure with stronger gates.