Provisions a new Server-side GTM container with infrastructure setup.
This Edge Function handles the complete provisioning workflow for a new SGTM container: port reservation, database record creation, optional first site setup, and infrastructure provisioning via external service.
POST /functions/v1/provision_sgtm_container
Service role (internal) - uses SUPABASE_SERVICE_ROLE_KEY. Infrastructure calls authenticated via INFRA_SECRET.
SUPABASE_SERVICE_ROLE_KEY
INFRA_SECRET
port_pool
sgtm_containers
sites
site_domains
INFRA_PROVISIONER_URL
Provisions a new Server-side GTM container with infrastructure setup.
Overview
This Edge Function handles the complete provisioning workflow for a new SGTM container: port reservation, database record creation, optional first site setup, and infrastructure provisioning via external service.
Endpoint
POST /functions/v1/provision_sgtm_containerAuthentication
Service role (internal) - uses
SUPABASE_SERVICE_ROLE_KEY. Infrastructure calls authenticated viaINFRA_SECRET.Behavior
port_pooltableTables Touched
port_pool(read/write)sgtm_containers(write)sites(write, optional)site_domains(write, optional)External Services
INFRA_PROVISIONER_URLNotes