Skip to main content

Certification track: Professional Cloud Database Engineer (PCDE)

Supabase on GKE Autopilot

Supabase on GKE Autopilot

Supabase is an open-source Firebase alternative — a full backend-as-a-service built on PostgreSQL. It provides a PostgreSQL 15 database with the pgvector extension, real-time subscriptions, GoTrue authentication, PostgREST REST APIs, an S3-compatible storage service, and an admin Studio dashboard, all behind a Kong API gateway. This module deploys Supabase on GKE Autopilot on top of the App_GKE foundation, which provisions and manages the shared Google Cloud and Kubernetes infrastructure.

GKE only. Supabase is available in the GKE variant only. Its multi-service architecture (Kong gateway, GoTrue, PostgREST, Realtime, Storage, Studio) requires persistent connections and Kubernetes primitives that Cloud Run does not support.

This guide focuses on the cloud services Supabase uses and how to explore and operate them from the Google Cloud Console and the command line. For the mechanics that are common to every GKE application — Workload Identity, ingress, autoscaling, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC Service Controls, backups, and the deployment lifecycle — refer to the App_GKE foundation guide rather than repeating them here.


What Supabase costs on RAD, and how that compares​

Supabase on RAD's GKE Autopilot module costs about US$96.70 a month in a Google Cloud project you own, plus a one-time 110-credit module fee (US$11, or 99 credits in a RAD-managed project, 10% lower). There is no Cloud Run variant — Supabase's multi-service architecture (Kong gateway, GoTrue, PostgREST, Realtime, Storage, Studio) needs persistent connections and Kubernetes primitives Cloud Run does not provide — so GKE Autopilot is the only way RAD deploys it. If you only need Supabase occasionally — a prototype backend, an evaluation before committing — a RAD-managed project can be deleted and restored within 30 days for a handful of credits (under US$1) instead of paying for it to sit idle. See Pause it for free, below. Figures are as at 8 October 2026; sources are listed at the end of this section.

What you pay on RAD​

In a Google Cloud project you ownIn a project RAD manages for you
Module fee, once per deployment110 credits (US$11 at the top-up price)99 credits (10% lower)
Build timeAbout 3-6 credits per buildThe same
Google Cloud running costBilled by Google to your own billing account, about US$96.70 a month for the default configuration (table below)Metered hourly in credits; RAD publishes 87 credits a day, about 2,610 a month
Who owns whatYou own the project and its billing; RAD deploys and updates itRAD owns the project, with guardrails, quotas and budget alerts; you get console access, and a minimum purchased balance is held in reserve

10 credits cost US$1 on a one-off top-up, and less on a monthly plan. In a project RAD manages, the database and network are shared by every application in the project, so a second application does not add a second set of them.

Default running cost in your own project (us-central1, Google list prices):

Resource (module default)Per month
GKE Autopilot pod, 1x vCPU / 2 GiBUS$39.68
Cloud SQL for PostgreSQL, 1 vCPU / 3.75 GB, zonal, 10 GB SSDUS$51.02
Cloud NAT and networkingUS$5.00
Cloud Storage (add-ons, backups)US$1.00
GKE cluster management feeshared across every GKE app in the project; $0 if this is your only cluster, else ~73
TotalUS$96.70

How it compares​

  • Supabase's own hosted cloud is the obvious comparison, since it's the same open-source project run by its own maintainer. Free is $0/month (2 active projects, 500 MB database, projects pause after a week of inactivity); Pro starts at $25/month (includes a $10 compute credit); Team starts at $599/month for SOC2/ISO compliance and SLAs (source: supabase.com/pricing). RAD's own-project figure sits well above the Pro plan's starting price, but you get a dedicated instance in your own GCP project rather than a shared, usage-metered one.
  • A self-managed comparison: Hetzner CPX22 (2 vCPU/4GB) runs about $24/month, a DigitalOcean 2 vCPU/4GB Droplet is the same $24/month, and a GCP Compute Engine e2-standard-2 (2 vCPU/8GB) is about $49/month — cheaper, but running the whole Supabase stack (gateway, auth, realtime, storage, Postgres) yourself on one of those means operating all of it by hand.
  • Supabase's six services together are a heavier footprint than most apps on RAD, which is reflected in the daily managed-project credit figure — the running cost here, not the module fee, is what actually drives the bill.

Pause it for free: delete a RAD-managed project, restore it when you need it​

If Supabase runs in a project RAD manages for you, deleting the whole project unlinks its billing first, then asks Google to delete the project outright — Google's own 30-day recoverable soft delete. Unlike deleting one module, this does not tear down Cloud SQL or the compute resource one by one: the whole project simply stops, and nothing is charged while it waits, because billing is already unlinked.

Restoring, within 30 days and only by the project's owner, asks Google to undelete the project and reattaches its billing account, then asks you to run Update on each deployment to confirm everything came back. Because nothing was individually destroyed, that Update finds the same resources already there — it is a check, not a rebuild, and an Update never charges the module fee again. This costs only a handful of credits (under US$1) in total for a typical 2-3-deployment chain.

What this needs: you must own the project (not one RAD only manages billing for), you must restore it yourself within 30 days — after that Google deletes it for good — and restoring is admitted like creating a new project, so your purchased credit balance must still clear the tier's floor (100 credits for the sandbox tier most study/demo use fits). Google says most services are fully working again within 36 hours of a restore.

One real gap: nightly backups are written to a bucket inside the project, and that bucket has Cloud Storage's soft-delete explicitly turned off, so it is very likely gone as soon as you delete the project — even though the project itself is recoverable for 30 days. If you have tables or storage objects you want to keep, copy a backup out (to Google Drive, or a bucket outside the project) before deleting. For a default install with nothing irreplaceable in it, this does not matter.

Pay only while you use it, the other way: delete and redeploy​

In your own project, or once the 30-day restore window has passed, the alternative is to delete Supabase outright and redeploy it later. A redeploy costs the module fee again, plus the builds — roughly 115 credits (about US$11.50) in your own project, or 104 credits in a RAD-managed one.

Deleting saves money only once Supabase would otherwise sit unused long enough to clear that redeploy cost against its own daily running cost — against the own-project total above (about US$3.22 a day), that works out to about 4 days or more, or about 2 days or more in a RAD-managed one (87 credits a day). Most of the running cost here is the database; it stops only when nothing else in the project uses it, so deleting Supabase while something else shares the project saves only this app's own compute part.

Keep data first: nightly backups go to a bucket inside the deployment and are deleted with it, so copy the latest backup out before deleting if you want to keep it.

Lab sessions and Managed Environments​

  • Lab sessions, for training: a trainer runs a session for a class. Each participant gets the app in their own Google Cloud project for 15 minutes to 24 hours, within an allowance the trainer sets. Either the trainer funds every place, or each participant pays for their own. Everything is deleted when the session ends and unused credits go back to the trainer.
  • Managed Environments, for consultancies: a partner runs the app for a client from a ring-fenced wallet it funds, and settles with the client directly. If the wallet runs low, billing pauses and the data is kept, so nobody receives an unexpected charge. At the end the partner hands the project over and the deployments become the client's own.
  • Credits can be bought in more than 20 currencies, including XAF, XOF, NGN, GHS, KES and ZAR, by card, bank transfer or mobile money.

Sources (8 October 2026): Google Cloud Billing Catalog API list prices; radmodules.dev/pricing for RAD's own fees and daily-credit estimates; Delete and restore projects for the pause/restore mechanics; supabase.com/pricing for Supabase's own hosted cloud plans.

1. Overview​

The Supabase deployment runs a Kong API gateway as the primary GKE workload, fronting a set of Supabase microservices. It wires together the following Google Cloud services:

CapabilityGoogle Cloud serviceNotes
API gateway (compute)GKE AutopilotKong gateway pods, 1 vCPU / 2 GiB by default, horizontally autoscaled
MicroservicesGKE Autopilot (additional services)GoTrue auth, PostgREST, Realtime, Storage API, Studio — each a separate Deployment
DatabaseGKE Autopilot (in-namespace supabase/postgres)Required — Supabase is PostgreSQL-native. Not Cloud SQL: main.tf sets database_type = "NONE" on the foundation and runs supabase/postgres as an additional service
Object storageCloud StorageA dedicated storage-suffixed bucket for file uploads
SecretsSecret ManagerJWT signing secret (auto-generated), anon key, service role key, publishable key, secret key, and secret_key_base
IngressCloud Load BalancingExternal LoadBalancer, optional custom domain + managed certificate

Sensible defaults worth knowing up front:

  • PostgreSQL 15 is mandatory. The database engine is fixed; using any other engine breaks startup.
  • Kong runs in declarative (database-less) mode. Routing is defined in /home/kong/kong.yml baked into the container image — no Kong database is needed.
  • JWT credentials are auto-generated or placeholder. The JWT signing secret is auto-generated (32 random characters). The anon key and service role key are stored as placeholders and must be replaced with valid signed JWTs before production use.
  • The in-namespace Postgres superuser password is auto-generated. Like the Realtime SECRET_KEY_BASE/DB_ENC_KEY, it's a random_password with no corresponding input variable — not user-supplied, and internal-only (ClusterIP, never exposed).
  • pgvector ships with the database image. pgcrypto, uuid-ossp, and pgvector come with supabase/postgres, so Supabase's AI/embedding features work out of the box; the foundation's own extension jobs are disabled (enable_postgres_extensions is overridden to false in main.tf) because they target Cloud SQL.
  • Image mirroring is always on. Kong and sidecar images are mirrored into Artifact Registry on every apply to avoid Docker Hub rate limits.
  • Session affinity is None. Kong is stateless; sticky routing is not required at the gateway level.

2. Google Cloud Services & How to Explore Them​

All commands assume you have run gcloud container clusters get-credentials <cluster> --region <region> --project <project> and that PROJECT, REGION, and NAMESPACE are set. The namespace and other identifiers are reported in the deployment Outputs.

A. GKE Autopilot — Kong gateway and Supabase microservices​

The primary GKE workload runs the Kong API gateway on port 8000. Kong routes all incoming requests to the Supabase microservices by path prefix:

Path prefixTarget servicePort
/auth/v1/*GoTrue (authentication)9999
/rest/v1/*PostgREST (REST API)3000
/realtime/v1/*Realtime (WebSocket)4000
/storage/v1/*Storage API5000

Additional Supabase services (GoTrue, PostgREST, Realtime, Storage, Studio) are deployed as separate Kubernetes Deployments in the same namespace via additional_services.

  • Console: Kubernetes Engine → Workloads → select a workload to see pods, events, and metrics. Kubernetes Engine → Services & Ingress shows the external IP.
  • CLI:
    kubectl get pods,svc,hpa -n "$NAMESPACE"
    kubectl logs -n "$NAMESPACE" deploy/<service-name> --tail=100
    kubectl describe hpa -n "$NAMESPACE" # current vs target utilisation

See App_GKE for how Autopilot, scaling, and the workload type (Deployment vs StatefulSet) are managed.

B. PostgreSQL 15 — in-namespace supabase/postgres​

Supabase stores all application data in a supabase/postgres Deployment running in the same namespace (a ClusterIP service, never exposed externally) — not Cloud SQL, and with no Auth Proxy involved. On first deploy the db-init job connects to it as supabase_admin and sets the service-role passwords, creates the Supabase schemas, and applies the public-schema grants.

Data is ephemeral. The postgres pod writes to the pod's local disk (ephemeral_storage_limit = "4Gi"), so data resets when the pod restarts — acceptable for a lab/test deployment; a production deploy needs a per-pod block PVC.

  • Console: Kubernetes Engine → Workloads → the postgres Deployment.
  • CLI:
    kubectl get deploy,svc -n "$NAMESPACE" | grep postgres
    kubectl exec -n "$NAMESPACE" deploy/<postgres-workload> -- \
    psql -U supabase_admin -d postgres -c '\dn'

For the foundation's own (unused here) Cloud SQL connection model, backups, and password rotation, see App_GKE.

C. Cloud Storage​

A dedicated Cloud Storage bucket (declared with name_suffix = "storage") is provisioned for Supabase file uploads. The workload service account is granted access automatically. Public-access prevention is set to inherited so bucket-level ACLs can be used for serving objects.

  • Console: Cloud Storage → Buckets.
  • CLI:
    gcloud storage buckets list --project "$PROJECT"
    gcloud storage ls gs://<storage-bucket>/ # bucket name is in the Outputs

See App_GKE for CMEK options and GCS Fuse mounts.

D. Secret Manager — JWT credentials and keys​

Supabase authentication is built on JWTs. Six secrets are stored in Secret Manager:

Secret suffixContentNotes
-jwt-secret32-char JWT signing secretAuto-generated if jwt_secret is empty
-anon-keyPublic anonymous JWTPlaceholder by default — must be replaced
-service-role-keyService role JWTPlaceholder by default — must be replaced
-publishable-keyPublishable (anon) opaque API keyPlaceholder if not provided
-secret-keyServer-side opaque API keyPlaceholder if not provided
-key-base64-char secret_key_base for Realtime/SupavisorAuto-generated if secret_key_base is empty

The database password is generated and managed separately by the foundation; its secret name is reported in the Outputs (database_password_secret).

  • Console: Security → Secret Manager.
  • CLI:
    gcloud secrets list --project "$PROJECT"
    # Retrieve the JWT signing secret:
    gcloud secrets versions access latest --secret=<prefix>-jwt-secret --project "$PROJECT"
    # Update the anon key after generating a signed JWT:
    echo -n "<signed-anon-jwt>" | gcloud secrets versions add <prefix>-anon-key \
    --data-file=- --project "$PROJECT"

See App_GKE for the Secret Store CSI integration and rotation.

E. Networking & ingress​

By default the Kong gateway is exposed through an external Cloud Load Balancing IP. A custom domain with a Google-managed certificate can be enabled, and a static IP can be reserved so the address survives redeploys.

  • Console: Network services → Load balancing; VPC network → IP addresses.
  • CLI:
    kubectl get ingress,svc -n "$NAMESPACE"
    gcloud compute addresses list --project "$PROJECT"

See App_GKE for custom domains and static IP details.

F. Cloud Logging & Monitoring​

Pod stdout/stderr flow to Cloud Logging; GKE and Cloud SQL metrics flow to Cloud Monitoring. Optional uptime checks and alert policies are available.

  • Console: Logging → Logs Explorer; Monitoring → Dashboards / Alerting.
  • CLI:
    gcloud logging read 'resource.type="k8s_container" AND resource.labels.namespace_name="'"$NAMESPACE"'"' \
    --project "$PROJECT" --limit 50

3. Supabase Application Behaviour​

  • First-deploy database setup. The db-init job connects to the in-namespace supabase/postgres service as supabase_admin and idempotently sets LOGIN passwords on the service roles the image leaves password-less (authenticator, supabase_auth_admin, supabase_storage_admin), creates the auth, storage, _realtime, and realtime schemas with their grants, and sets the app.settings.jwt_secret/jwt_exp database GUCs. It runs non-blocking (execute_on_apply = false) with its own pg_isready wait loop, because the foundation creates initialization jobs before additional services. It is safe to re-run.
  • JWT placeholder replacement. After the first deploy, the anon key and service role key secrets contain placeholder strings. These must be replaced with valid JWTs signed by the auto-generated jwt_secret before Supabase clients can authenticate:
    1. Retrieve the JWT secret: gcloud secrets versions access latest --secret=<prefix>-jwt-secret
    2. Generate an anon JWT (role: anon) and a service_role JWT (role: service_role) using jwt.io or the Supabase JWT generator.
    3. Upload each JWT: echo -n "<jwt>" | gcloud secrets versions add <secret-name> --data-file=-
    4. Restart the Kong pod to pick up the updated secrets: kubectl rollout restart deploy/<kong-workload> -n "$NAMESPACE"
  • JWT credentials are immutable as a set. The jwt_secret, anon_key, and service_role_key must always be regenerated together. Changing the JWT secret while leaving derived keys unchanged invalidates all issued tokens immediately.
  • Kong is stateless. The gateway reads routing from the declarative kong.yml baked into the image. No Kong database is used.
  • Health probes are TCP, not HTTP /health. The startup_probe/liveness_probe (and startup_probe_config/health_check_config) variables all declare an HTTP GET /health default, but kong.yml's DB-less declarative config defines no /health route (only /rest/v1, /auth/v1, /realtime/v1, /storage/v1, /pg, and / for Studio) — an HTTP probe against it would 404. main.tf unconditionally overrides the deployed Kong container's startup and liveness probes to TCP on the container port, regardless of what these variables are set to. The startup probe still allows ~5 minutes (15 s initial delay × 30 failures × 10 s period) for first-boot database setup to complete.
  • Realtime uses PostgreSQL LISTEN/NOTIFY. No Redis is required for the core Supabase stack; enable_redis defaults to false.

4. Configuration Variables​

Variables are grouped exactly as they appear on the deployment platform. Only settings specific to or notable for Supabase are listed; every other input is inherited from App_GKE with its standard behaviour and defaults.

Group 1 — Project & Identity​

VariableDefaultDescription
project_id(required)Target Google Cloud project.
regionus-central1Region for the workload and regional resources.

Group 2 — Deployment Environment​

VariableDefaultDescription
tenant_iddemoShort suffix that makes resource names unique per environment.
support_users[]Emails granted project access and monitoring alerts.
resource_labels{}Labels applied to all resources for cost/ownership tracking.

Group 3 — Application Identity​

VariableDefaultDescription
application_namesupabaseBase name for resources. Do not change after first deploy.
application_display_nameSupabaseFriendly name shown in the Console.
application_description(set)Workload description annotation.
application_version2.8.1Kong gateway image version tag. Pin to a tested version; avoid latest in production.

Group 4 — Runtime & Scaling​

VariableDefaultDescription
deploy_applicationtrueSet false to provision infrastructure only.
container_resources1000m / 2GiCPU limit and memory limit for the Kong gateway container. Raise CPU to 2000m for production traffic.
min_instance_count1Minimum Kong pod replicas. Keep ≥ 1 — cold starts disrupt OAuth redirect flows.
max_instance_count3Maximum Kong pod replicas (autoscaler ceiling).
container_port8000Kong HTTP proxy port.
enable_cloudsql_volumetrueCloud SQL Auth Proxy sidecar. Not used by Supabase — every service connects to the in-namespace supabase/postgres directly.
enable_vertical_pod_autoscalingfalseLet Autopilot tune resource requests automatically.
container_image_sourcecustomImage source mode. custom builds via Cloud Build from Supabase_Common/scripts/Dockerfile.
enable_image_mirroringtrueAlways enabled — Kong is mirrored from Docker Hub into Artifact Registry.

Group 5 — Environment Variables & Secrets​

VariableDefaultDescription
environment_variables{}Extra non-secret settings. Core Kong/Supabase values are set automatically.
secret_environment_variables{}Additional Secret Manager references injected as env vars.
jwt_secret""JWT signing secret. Leave empty to auto-generate 32-char random. Treat as permanently immutable after first deploy.
anon_key""Public anonymous JWT. Leave empty; a placeholder is stored — replace post-deploy.
service_role_key""Service role JWT (full DB access). Leave empty; replace post-deploy. Never expose in client code.
publishable_key""Publishable (anon) opaque API key for newer Supabase clients. Placeholder if empty.
supabase_secret_key""Server-side opaque API key for newer Supabase clients. Placeholder if empty.
secret_key_base""64-char internal encryption secret for Realtime/Supavisor. Auto-generated if empty.
site_urlhttp://localhost:3000Base URL for GoTrue auth redirects. Set to your public domain.
api_external_urlhttp://localhost:8000External Supabase API URL for OAuth redirect construction.
supabase_public_urlhttp://localhost:8000Public base URL for the dashboard and REST API.
jwt_expiry3600JWT expiry in seconds for GoTrue-issued tokens.
pgrst_db_schemaspublic,storage,graphql_publicPostgreSQL schemas exposed by PostgREST.

Group 6 — GKE Backend & Cluster​

VariableDefaultDescription
service_typeLoadBalancerHow the Kong Service is exposed externally.
session_affinityNoneKong is stateless; sticky routing not required.
workload_typenullDefaults to Deployment.
gke_cluster_name""GKE cluster name. Leave empty for auto-discovery.
namespace_name""Kubernetes namespace. Leave empty to auto-generate.
termination_grace_period_seconds60Seconds before SIGKILL after SIGTERM.
enable_network_segmentationfalseCreate Kubernetes NetworkPolicy resources.

Group 7 — StatefulSet​

VariableDefaultDescription
stateful_pvc_enablednullEnable PVC templates in the StatefulSet. Leave unset — Supabase state lives in Cloud SQL and GCS, not pod-local storage.
stateful_pvc_size10GiPVC size per pod (if StatefulSet PVCs are enabled).

Group 8 — Resource Quota​

VariableDefaultDescription
enable_resource_quotafalseCap namespace CPU/memory/object counts.
quota_memory_requests / quota_memory_limits""Must use binary units (4Gi, 8192Mi) — bare integers are read as bytes and block all pod scheduling.

Group 9 — Reliability Policies​

VariableDefaultDescription
enable_pod_disruption_budgettrueProtect availability during node upgrades.
pdb_min_available1Raise min_instance_count above 1 if you need eviction headroom.
enable_topology_spreadfalseSpread pods across zones.

Group 10 — Observability & Health​

VariableDefaultDescription
startup_probe_configHTTP /health, 30 s initial delay, 18 failuresIgnored. main.tf hardcodes the deployed Kong startup probe to TCP; see §3.
health_check_configHTTP /health, 60 s initial delay, 3 failuresIgnored. main.tf hardcodes the deployed Kong liveness probe to TCP; see §3.
uptime_check_configdisabledOptional Cloud Monitoring uptime check.
alert_policies[]Optional metric alert policies.

Group 11 — Workload Automation​

VariableDefaultDescription
initialization_jobs[]Leave empty to use the built-in db-init job.
cron_jobs[]Scheduled cluster tasks (e.g. database cleanup routines).
additional_services[]Supabase microservices (GoTrue, PostgREST, Realtime, Storage API, Studio) deployed as additional Kubernetes Deployments in the same namespace. Each entry specifies name, image, port, resource limits, environment variables, and probe configuration.

Group 12 — CI/CD & GitHub Integration​

Standard App_GKE Cloud Build / Cloud Deploy integration — see App_GKE. Key inputs: enable_cicd_trigger, github_repository_url, github_token, enable_cloud_deploy, enable_binary_authorization, binauthz_evaluation_mode.

Group 13 — Filesystem (NFS)​

VariableDefaultDescription
enable_nfsfalseNFS is not needed for Supabase; storage is handled by GCS. Enabling it adds unnecessary cost.
nfs_mount_path/var/lib/storageMount path if NFS is enabled.

Group 14 — Cloud Storage & Artifact Registry​

VariableDefaultDescription
create_cloud_storagetrueProvision the storage-suffixed bucket.
storage_buckets / gcs_volumes(set by Common)Additional buckets / GCS Fuse mounts.
manage_storage_kms_iam / enable_artifact_registry_cmekfalseCMEK options.

Group 16 — Database Backend​

VariableDefaultDescription
database_typePOSTGRES_15Inert — main.tf overrides the value the foundation actually receives to "NONE", since PostgreSQL runs in-namespace rather than on Cloud SQL.
application_database_namepostgresDatabase name. Immutable after first deploy.
application_database_usersupabase_adminApplication user. Immutable after first deploy.
enable_postgres_extensionstrueInstall pgcrypto, uuid-ossp, and pgvector. Required.
postgres_extensions["pgcrypto","uuid-ossp","pgvector"]Extension list.
database_password_length32Generated password length (16–64).
enable_auto_password_rotationfalseZero-downtime DB password rotation.

Group 17 — Backup & Maintenance​

VariableDefaultDescription
backup_schedule0 2 * * *Automated backup cron (UTC).
backup_retention_days7Retention; raise to 30–90 for production/compliance.
enable_backup_import / backup_source / backup_urirestore optionsRestore from a backup on deploy.

Group 18 — Custom SQL Scripts​

enable_custom_sql_scripts, custom_sql_scripts_bucket, custom_sql_scripts_path, custom_sql_scripts_use_root — run SQL from a GCS bucket after provisioning. See App_GKE.

Group 19 — Custom Domain, Static IP & Networking​

VariableDefaultDescription
enable_custom_domaintrueProvision Ingress for custom hostnames + managed certificate.
application_domains[]Hostnames to serve.
reserve_static_iptrueStable external IP across redeploys.
network_tags[]Network tags applied to GKE nodes and pods.

Group 20 — Identity-Aware Proxy (IAP)​

VariableDefaultDescription
enable_iapfalseRequire Google sign-in in front of the Kong gateway.
iap_authorized_users / iap_authorized_groups[]Who may access.
iap_oauth_client_id / iap_oauth_client_secret""Required when IAP is enabled (sensitive).
iap_support_email""Shown on the OAuth consent screen.

Group 21 — Cloud Armor​

VariableDefaultDescription
enable_cloud_armorfalseAttach a Cloud Armor (WAF) policy to the Ingress backend.
admin_ip_ranges[]CIDRs allowed privileged access.
cloud_armor_policy_namedefault-waf-policyPolicy name.
enable_cdnfalseEnable Cloud CDN on the GKE Ingress backend.

Group 22 — VPC Service Controls & Audit Logging​

VariableDefaultDescription
enable_vpc_scfalseEnforce a VPC-SC perimeter (requires organization_id).
vpc_cidr_ranges / vpc_sc_dry_run(set)Access level CIDRs / dry-run mode.
enable_audit_loggingfalseDetailed Cloud Audit Logs.

5. Outputs​

These values are returned on a successful deployment and are the quickest way to locate and explore the running resources.

OutputDescription
service_nameKubernetes Service name (Kong gateway).
namespaceNamespace the workload runs in.
service_cluster_ipIn-cluster ClusterIP.
stage_service_cluster_ipsMap of ClusterIPs for stage-specific services.
service_external_ipExternal LoadBalancer IP (when a static IP is reserved).
service_urlURL to reach the Supabase API via the Kong gateway.
database_instance_nameCloud SQL instance name.
database_nameApplication database name (postgres).
database_userApplication database user (supabase_admin).
database_password_secretSecret Manager secret holding the DB password.
database_host / database_portDB endpoint (127.0.0.1 via Auth Proxy) / port.
storage_bucketsCreated Cloud Storage buckets.
network_name / network_exists / regionsVPC network, presence, available regions.
container_image / container_registryDeployed Kong image and Artifact Registry repo.
monitoring_enabled / monitoring_notification_channelsMonitoring status and channels.
initialization_jobs / db_import_jobNames of the setup and (optional) import jobs.
deployment_id / tenant_id / resource_prefixNaming identifiers.
project_id / project_numberProject identifiers.
cicd_enabled / cicd_configurationCI/CD status and details.
github_repository_url / github_repository_owner / github_repository_nameConnected repo.
artifact_registry_repository / cloudbuild_trigger_name / cloudbuild_trigger_idBuild pipeline.
kubernetes_readyWhether the cluster/workload is ready.
vpc_sc_enabled / vpc_sc_perimeter_name / vpc_sc_dry_run_modeVPC-SC status.
audit_logging_enabled / artifact_registry_cmek_enabledAudit logging and CMEK status.

6. Configuration Pitfalls & Sensible Defaults​

Risk: Critical (data loss / outage / security) — High (service degraded) — Medium (cost or partial degradation) — Low (minor).

SettingSensible valueRiskConsequence if wrong
jwt_secretauto-generated or fixed at first deployCriticalChanging it post-deploy invalidates every issued JWT; all client connections break. anon_key and service_role_key must be regenerated together.
anon_key / service_role_keysigned JWTs (replace placeholders)CriticalPlaceholder values cause every Supabase API call to return 401. All three JWT credentials must be regenerated as an atomic set.
enable_cloudsql_volumetrueLowInert for Supabase — GoTrue, PostgREST, Realtime and Storage all connect to the in-namespace supabase/postgres over their own postgres:// URLs, not through the Auth Proxy.
database_typePOSTGRES_15LowInert — main.tf passes "NONE" to the foundation regardless, because PostgreSQL 15 runs as an in-namespace supabase/postgres service.
application_database_name / _userset onceCriticalImmutable after first deploy; renaming recreates the DB/user and destroys data.
enable_backup_importfalse unless restoringCriticalEnabling without a valid backup_uri fails the import job.
quota_memory_requests / _limitsbinary units (4Gi)CriticalBare integers are bytes and block all pod scheduling.
enable_postgres_extensionstrueLowOverridden to false in main.tf (the foundation's extension jobs target Cloud SQL, which this module does not use); the extensions ship inside the supabase/postgres image.
min_instance_count1HighSetting to 0 allows scale-to-zero; Kong cold starts take 15–30 s and disrupt OAuth redirect flows.
container_resources CPU2000m for productionHighInsufficient CPU causes elevated latency and 504 timeouts under load.
container_resources memory2Gi minimumHighToo little memory causes OOM kills under concurrent load.
startup_probe_config / startup_probeinert — main.tf hardcodes the deployed probe to TCP (failure_threshold=30, period_seconds=10, ~5 min)HighSetting these variables has no effect on the deployed Kong container; do not rely on them to extend first-boot tolerance — see §3.
site_url / api_external_url / supabase_public_urlreal public URLsHighLocalhost defaults prevent OAuth flows and redirect construction from working outside the cluster.
application_versionpinned (not latest)MediumPulling latest risks Kong versions incompatible with the bundled declarative config.
enable_nfsfalseLowNFS is unnecessary for Supabase; enabling it adds Filestore cost and a dependency that can delay provisioning.
enable_redisfalseMediumRedis is optional. If set to true, redis_host must point to a reachable endpoint; an unreachable host causes Kong startup timeouts.

For the foundation behaviour referenced throughout — IAM and Workload Identity, autoscaling, ingress and certificates, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC-SC, backups, and image mirroring — see App_GKE. Supabase-specific application configuration shared across secrets, the Kong image build, and the database init job is described in Supabase_Common.

Need RAD to do something it does not do yet? Request it on the roadmap, or vote on what is already there.