Deploying LiteLLM on Google Cloud Run with Terraform: what it gives you
Cloud Run with Terraform is a sound path when a platform team wants a self-hosted, governed AI gateway on Google Cloud without operating a Kubernetes cluster, and when its traffic does not need token-level autoscaling. The LiteLLM GCP Terraform stack provisions a VPC with Private Services Access, a Cloud SQL PostgreSQL primary with a read replica, Memorystore Redis with TLS, a GCS bucket, Secret Manager entries, Cloud Run services and a global HTTPS load balancer. Everything runs in a project and network the organization controls, so prompts, keys and spend records stay inside its own cloud boundary.
PostgreSQL and Redis are not optional extras in this design. LiteLLM virtual keys need a PostgreSQL database to store keys, users, teams, budgets and spend, so the gateway cannot issue governed keys without it. Once more than one proxy instance runs, which Cloud Run does by default as traffic grows, Redis carries shared rate limits, router state and cache. LiteLLM's production guide requires Redis 7.0 or newer for this, so the Memorystore version and TLS settings should be confirmed against that requirement before the first deployment. Plan the Cloud SQL tier and Memorystore size from expected request volume, and ask the implementation partner to show how the module sets the database and Redis connection strings through Secret Manager rather than plain environment variables.
Confirm three things before committing to this path. First, Cloud Run scales on request concurrency with no custom metric input, and LiteLLM notes there is no token-per-second autoscaling path on GCP outside GKE, so teams with throughput targets based on tokens should test against that limit. Second, check the module version and the LiteLLM release line it deploys, since the current release line is maintained for the four most recent stable minor versions. Third, decide who owns the LITELLM_MASTER_KEY secret and how rotation happens. If these answers point to fine-grained scheduling or per-token autoscaling, compare against GKE before building.
How LiteLLM traffic and data flow through the GCP stack
Requests start at client applications and reach a global HTTPS load balancer, which hands them to the LiteLLM services on Cloud Run inside a VPC. Those services read keys, budgets and spend from Cloud SQL PostgreSQL (writes on the primary, lookups on the read replica), share rate limits and router state through Memorystore Redis over TLS, and read credentials from Secret Manager. Check that the database and Redis sit on Private Services Access, and confirm the outbound path your model provider calls will use before go-live.
Request, data store and secret paths for LiteLLM on the GCP stack.
Which Cloud Run stack options fit which situation
This table compares the configuration choices a team makes when running LiteLLM on the GCP Terraform stack, and when GKE is the better fit. Read each row for the situation where an option fits and the trade-off it carries, then confirm the sizing and quota details against your own project before you commit.
| Decision | Choose this when | Trade-off to plan for |
|---|---|---|
| Single Cloud Run service for proxy and UI | Your team is small, one group operates the gateway, and you want the fewest moving parts to deploy and roll back. | Gateway traffic, admin UI and management APIs share scaling and blast radius, so a UI problem or heavy admin use can affect callers. |
| Separate Cloud Run services for gateway and UI | Callers need steady gateway capacity while admins use the UI occasionally, or you want to restrict UI access through separate ingress rules. | Two services to deploy, version and monitor, and you must confirm that both point at the same database and key configuration. |
| Cloud SQL PostgreSQL without a read replica | Early pilots or low key and spend query volume, where the primary can absorb all reads and writes. | Key lookups and spend queries compete with writes on one instance, and a primary failure is a single point for the gateway. |
| Cloud SQL with a read replica | Spend reporting, dashboards or many key lookups add read load, and you want those reads kept off the primary. | Replication lag can show stale spend or key data, and you must confirm which LiteLLM operations use the reader and which fall back to the writer. |
| Memorystore Redis with TLS | More than one proxy instance runs, since shared rate limits, router state and cache need a common store. | Redis 7.0 or newer is required, and TLS adds configuration on each client. Confirm the Memorystore tier and memory size against expected throughput. |
| Single-instance or no Redis | A single proxy instance in a non-production test environment where shared state is not needed. | Rate limits and router cooldowns become per instance, so scaling out later changes behavior and needs a migration step. |
| Secret Manager for master key and database credentials | You need the master key, database password and provider keys outside Terraform state and container images. | Secret versions, IAM bindings for each Cloud Run service account and rotation steps need an owner. Confirm who may read each secret. |
| Global HTTPS load balancer with a managed domain | Callers reach the gateway through a stable domain, TLS terminates at the edge, and you want one entry point for regions added later. | Certificate provisioning and DNS cutover take planning, and load balancer costs recur. Ask for the current pricing from Google Cloud before budgeting. |
| Cloud Run without token-based autoscaling | Request concurrency is a workable signal for your traffic and you accept scaling on requests rather than tokens. | LiteLLM notes there is no token-per-second autoscaling path on GCP outside GKE, so long streaming responses can need manual capacity planning. |
| GKE instead of Cloud Run | You need token-based or custom-metric autoscaling, a shared cluster with other workloads, or Kubernetes-native controls across many services. | Cluster operations, node upgrades and Kubernetes skills become your responsibility. The Helm deployment path is the one to compare against this stack. |
Setting up the LiteLLM GCP Terraform stack step by step
This sequence takes an empty Google Cloud project to a LiteLLM gateway that answers health checks, reaches its database and Redis, and issues and enforces a test virtual key, with a check closing each stage.
Confirm project, IAM and API enablement
Your cloud platform team confirms the target project, billing link, and the identity Terraform will run as, then enables the Google Cloud APIs the stack needs for Cloud Run, Cloud SQL, Memorystore, Secret Manager, Compute networking and load balancing. Confirm the exact API list against the module's documentation, since it changes between releases. The step is done when a plan run under that identity reads the project without permission errors and the enabled services list matches the module's requirements. Record who holds the deployer role so later changes stay traceable.
Prepare Terraform state and variables
The platform engineer creates a remote state backend in a Cloud Storage bucket with object versioning and restricted access, then sets the region, project, environment name, domain name and any model or sizing variables in a version-controlled variables file. Keep secret values out of that file. The step is done when
terraform initcompletes against the remote backend andterraform planruns without errors on an empty state, which confirms the provider versions and variable types are accepted.Apply networking with Private Services Access
Apply the VPC and Private Services Access configuration first, because Cloud SQL and Memorystore attach to private IP ranges inside that VPC. Review the plan for the reserved address range and the service networking connection, and confirm the range does not overlap existing networks you route to. The step is done when the VPC and private connection show as created and a plan for the next stage shows no pending network changes. Anything still pending here will block the database and cache.
Provision Cloud SQL and Redis
Apply the Cloud SQL PostgreSQL primary with its read replica and the Memorystore Redis instance with TLS enabled. LiteLLM's production guide names PostgreSQL as the primary supported database and requires Redis 7.0 or newer once more than one proxy instance runs, so confirm the Redis version the module selects. Check that the instances report ready, that Redis TLS is on, and that the database has no public IP. Record the connection endpoints and the Redis CA details for the next steps.
Load secrets into Secret Manager
Create the secret entries and load values for the database connection, Redis connection and the LiteLLM master key. The master key must start with sk- and should be generated with a cryptographically random source, not typed by hand. Also load provider credentials, or confirm that the approved model providers are reached through a method your organization has agreed. Grant only the Cloud Run service account access to each secret version. The step is done when the service account can read each secret and a listing shows no secret values in Terraform outputs or logs.
Deploy Cloud Run services
Apply the Cloud Run configuration for the LiteLLM proxy, pointing it at the Cloud SQL writer, the read path if you use one, the Redis instance and the mounted secrets. Set the container image to a version you have verified against the supported release line, and keep one worker per instance as LiteLLM recommends for horizontal scaling. Check that the revision becomes ready and the startup logs show the database migration completed without errors. Cloud Run scales on request concurrency only, so plan scaling limits and note that token-based autoscaling is not available on this path.
Configure the global HTTPS load balancer and certificates
Apply the global external HTTPS load balancer, its serverless network endpoint group pointing at the Cloud Run service, the managed certificate for your gateway hostname, and DNS records. Confirm the certificate status moves to active after DNS resolves, which can take time you should not assume is fixed. The step is done when the hostname resolves to the load balancer address and an HTTPS request returns a TLS response from LiteLLM rather than a certificate or routing error. Decide now whether the Cloud Run ingress setting restricts traffic to the load balancer.
Run health, connectivity and test key checks
Run the verification set in order: call the liveness and readiness endpoints through the load balancer, confirm the logs show a successful database connection and a successful Redis connection, then create a test virtual key with a small budget and a single allowed model. Send one request with that key, confirm a response and a spend record in the database, then send a request with a model the key is not permitted to use and confirm it is refused. Delete the test key afterward. The stack is ready for pilot callers only when all of these pass.
When Cloud Run is the better fit and when GKE is
Cloud Run suits teams that want LiteLLM running without operating nodes, cluster upgrades or a Kubernetes control plane. The GCP Terraform stack provisions Cloud Run services alongside the VPC, Cloud SQL, Memorystore, Secret Manager and a global HTTPS load balancer, so the platform team owns infrastructure code rather than cluster operations. Scaling follows request concurrency, which is a reasonable signal for many gateway workloads.
- Operational footprint: No nodes, node pools or cluster version upgrades to schedule, which shifts routine work onto Terraform and service configuration.
- Scaling signal: Cloud Run scales on request concurrency with no custom metric input, so the gateway scales with incoming requests rather than token throughput.
- Network integration: Services reach Cloud SQL and Memorystore over private addressing through the VPC stack provisioned by the module.
- Team skills: Teams already running Cloud Run services can reuse their deployment, logging and IAM patterns.
- Limits to confirm: Check current Cloud Run concurrency, instance and timeout settings against your longest streaming responses before sizing.
Confirm that request-concurrency scaling matches your traffic shape by testing with representative streaming prompts.
Some teams need to scale the gateway on tokens per second, queue depth or other custom signals that reflect model load more closely than request count. LiteLLM's production guidance notes that Cloud Run has no token-per-second autoscaling path on GCP, so this requirement points toward GKE. Long generations can hold a request open for a long time, and a request-count signal may not reflect the real load on the gateway.
- Custom signals: GKE allows autoscaling from metrics the team exports, such as token throughput or latency, through the Kubernetes autoscaling stack.
- Worker layout: LiteLLM recommends one Uvicorn worker per pod on Kubernetes and scaling horizontally, which fits pod-level autoscaling.
- Long-running traffic: Workloads with long streaming responses may need tuning that is easier to control at the pod level.
- Measurement first: Load test both runtimes with production-like prompts before choosing, because the bottleneck may be the database or Redis rather than the runtime.
- Ask your team: Confirm whether your metrics pipeline can feed a custom autoscaling signal before committing.
Identify the scaling signal you need and verify that Cloud Run cannot meet it before moving to GKE.
Organizations that already run Kubernetes platforms usually want LiteLLM to follow the same standards as other workloads: admission policies, network policies, service mesh, GitOps delivery and cluster-level monitoring. In that case GKE is the better fit even when serverless would work technically. The sibling topic on installing LiteLLM on Kubernetes with Helm covers the GKE install path, including the chart choice, external PostgreSQL and Redis, the migrations job and secrets.
- Platform standards: Existing policy, ingress and identity controls can apply to LiteLLM without a separate control path.
- Deployment tooling: Teams already using Helm or GitOps tooling can manage LiteLLM with the same pipeline.
- Control plane access: GKE gives the platform team direct control of node, network and pod configuration.
- Ongoing effort: Expect cluster upgrades, node maintenance and capacity planning to move to your team or partner.
- Install reference: Follow the Kubernetes sibling topic for the GKE path rather than building that design from this page.
Confirm who will own cluster upgrades and patching before choosing GKE.
The choice is not permanent, and many teams start on one runtime and move later. Start with the decision criteria that matter for your organization, then document the reason so the next review has a baseline. The Terraform modules for each path should keep database, Redis and secret configuration close to the runtime, which makes a later move easier to plan.
- Written criteria: Record the scaling signal, operating model and compliance requirements that drove the choice.
- Shared dependencies: Cloud SQL, Memorystore and Secret Manager configuration can stay the same across runtimes.
- Cutover planning: Plan a parallel run, traffic shift through the load balancer and key and spend data checks before moving.
- Ownership: Name the team responsible for each runtime, including patching and on-call.
- Vendor guidance: Check the current LiteLLM production guidance for any runtime limits before finalizing.
Confirm your scaling needs in writing with the people who will operate the gateway, then choose the runtime that matches them.
Securing the Cloud Run gateway and its data stores
A Cloud Run deployment of LiteLLM holds provider keys, virtual key data and spend history in several managed services. The controls below cover how the gateway is exposed, how its secrets and data stores are reached, and how the infrastructure code itself is protected. Each card names one control and what to verify in your own project.
Master key in Secret Manager
The LITELLM_MASTER_KEY must start with sk- and grants administrative control over the gateway, so it should never appear in Terraform variables, container environment files or build logs. Store it as a Secret Manager entry and mount it into the Cloud Run service by reference. Confirm that only the Cloud Run runtime identity can read that secret, and that rotation is a documented procedure your team can run without redeploying the whole stack.
Production guideRestricting public ingress
Cloud Run services can be reached directly unless ingress is restricted, which would bypass the global HTTPS load balancer and its controls. Confirm that the service accepts traffic only from the load balancer path, and that the load balancer is the single public entry point. Check the TLS certificate, the allowed hostnames and any Cloud Armor policy your security team requires before the gateway receives production traffic.
Private connectivity to data stores
Cloud SQL and Memorystore should have private IP addresses reached through the VPC with Private Services Access, not public endpoints with authorized networks. Confirm that the Cloud Run service uses a serverless connector or direct VPC egress to reach both stores, and that no database accepts connections from the internet. Review the firewall and route configuration in the VPC rather than assuming the module defaults match your policy.
TLS on Redis connections
The Terraform stack provisions Memorystore Redis with TLS, but the gateway must also be configured to connect with TLS enabled and to validate the server certificate. Confirm the connection settings in the deployed service, and test that a plaintext connection attempt fails. Redis carries shared rate limits, router state and cache data across instances, so an unencrypted path would expose more than cache contents.
Least-privilege service accounts
Give the Cloud Run runtime its own service account with only the roles it needs: Cloud SQL client access, read access to the specific secrets it mounts, and write access to the one GCS bucket it uses. Avoid project-wide editor or owner roles and keep the Terraform deployment identity separate from the runtime identity. Review the granted roles after each module upgrade, since new resources can add permissions.
Terraform state protection
Terraform state holds database passwords, generated values and resource identifiers in plain text. Store state in a versioned, access-controlled backend with encryption, restrict who can read or write it, and enable state locking so concurrent applies cannot corrupt it. Keep state out of source control and confirm who can approve applies that change IAM bindings or network rules.
Audit logging and IP allowlisting
Enable Cloud Audit Logs for administrative and data access on the project, and confirm that logs for the gateway, load balancer and data stores reach the destination your security team monitors. Check which admin actions in LiteLLM itself are recorded. IP allowlisting and Google secret manager integration are Enterprise capabilities, so confirm with the LiteLLM team which editions and versions provide them before you plan around them.
Enterprise docsQuestions buyers ask before deploying LiteLLM on Cloud Run
What does a LiteLLM deployment on Cloud Run cost, and what drives the price?
The cost has two parts: the one-time build of the Terraform stack, configuration and handover, and the recurring Google Cloud bill plus support or upkeep. The Google Cloud bill is driven by the components the stack provisions: Cloud Run services, Cloud SQL PostgreSQL with a read replica, Memorystore Redis with TLS, Secret Manager entries, a GCS bucket and a global HTTPS load balancer. Size of each component, number of gateway instances, region and log volume move the bill most. The build cost depends on the number of environments, how many identity and secrets integrations are in scope, and how many model providers need routes. Ask for a quote that lists each component, the environments covered and who pays for the Google Cloud resources. Do not assume the infrastructure bill is small because the software is open source.
How long does a LiteLLM Cloud Run deployment take?
Duration depends on how much of the environment already exists and how many decisions are still open. The main factors are whether the GCP projects, networking and DNS are ready, how many environments you need (for example, staging and production), whether SSO and secrets integrations are in scope, how many model providers must be connected and how long your security and change approval process takes. Teams that have not yet agreed on identity, network exposure and data retention usually spend more time on those decisions than on the Terraform itself. Ask any partner for a written timeline tied to the agreed scope and a list of the dependencies that could move it, such as certificate issuance or provider account approval.
What must our internal team provide before a Cloud Run deployment starts?
Your team typically provides the following before build work begins:
- GCP projects and billing accounts for each environment, with the organization policies that apply to them
- IAM roles for the people and automation that run Terraform, and a decision on who approves changes
- DNS zones and the hostname the gateway will use
- TLS certificates or the approach for issuing them for the global HTTPS load balancer
- Credentials for each model provider you plan to route to, and an owner for each key
- Identity provider details if you want SSO on the admin UI, and the secrets store you want to use
Confirm the exact list with your cloud and security teams, because internal naming, network and approval rules differ between organizations.
Can our own engineers deploy LiteLLM on Cloud Run without a partner?
Yes, if your team already runs Terraform on Google Cloud and can operate managed PostgreSQL, Redis and load balancers. LiteLLM publishes production guidance covering PostgreSQL as the primary supported database, Redis 7.0 or newer once more than one proxy instance runs, and secrets handling for the master key, which must start with sk-. The harder parts are usually not the first apply. They are the decisions around network exposure, key and budget design, upgrade and migration procedure, backups, and evidence for your security reviews. Your team should be able to answer who receives alerts, how a failed database migration is rolled back and how a new LiteLLM release is tested before it reaches production. If those answers are not yet written down, a fixed-scope partner engagement can cover them alongside the build.
Is Cloud Run or GKE cheaper to run for LiteLLM?
Cloud Run is usually simpler to operate for a single gateway, but no general answer on price can be given without your traffic profile and sizing. The cost difference depends on steady request volume, how much idle capacity you accept, the number of gateway instances, and the platform staff you already have to run a Kubernetes cluster. Cloud Run scales on request concurrency with no custom metric input, so LiteLLM notes there is no token-per-second autoscaling path on GCP outside GKE. If token-based autoscaling matters to you, GKE is the better fit, and the operating cost of a cluster should be included in the comparison. Ask for a side-by-side estimate from your own request profile, and compare it with the cost of the team that would run each option.
What recurs after launch, such as upgrades and database migrations?
Several activities recur for as long as the gateway runs. LiteLLM maintains support for the four most recent stable minor versions for both open source and Enterprise deployments, so you need a rhythm for moving onto a supported release. Each upgrade can include database migrations on Cloud SQL, changes to the container image that Cloud Run runs, and checks against your provider routes and keys. Other recurring work includes patching the base images, rotating secrets in Secret Manager, reviewing budgets and access, checking backups and the read replica, and reviewing logs and alerts. Plan who owns each activity, how often it happens and how a release is tested in staging before production. If you want an outside team to carry this work, ask for the retainer scope in writing.
Does a Cloud Run deployment of LiteLLM need a security review before go-live?
Most regulated organizations run a security review before a gateway that handles model credentials and prompts goes live. The review usually covers how the admin interface is exposed, how the master key and provider credentials are stored and rotated, which identities the Cloud Run services and database use, how data is encrypted and where logs go. The Terraform stack keeps the database and Redis on private networking through Private Services Access and stores entries in Secret Manager, which gives your reviewers concrete controls to examine. Ask whether the scope includes a test of the deployed setup and a written list of findings with fixes. DeployOpen does not issue audit reports or certifications; independent auditors and certification bodies do that work.
Limits to confirm in your GCP environment
The limits below shape how a LiteLLM gateway on Cloud Run behaves under load, how it stays consistent across instances, and how long it stays supported. Each card names a limit to verify with LiteLLM, with Google Cloud, or in your own project before you approve the design.
Cloud Run concurrency and autoscaling
Cloud Run scales on request concurrency and does not accept custom metrics, so LiteLLM notes there is no token-per-second autoscaling path on GCP outside GKE. Confirm the concurrency setting and maximum instance count you plan to use, and test whether bursts of long streaming responses hold latency within your target. Check how instances scale down during quiet periods, since cold starts add delay to the first request.
- Primary scaling signal
- Concurrency
Cloud SQL and Redis capacity
Spend writes and key lookups land on Cloud SQL PostgreSQL, and rate limits, router state and cache sit in Memorystore Redis. Ask for the instance tiers, storage growth per logged request and connection limits for your expected traffic, and confirm the read replica handles the read paths you intend to offload. Agree sizing with a load test in your own project rather than relying on defaults.
Redis 7.0 or newer
LiteLLM requires Redis 7.0 or newer once more than one proxy instance runs, because shared rate limits, router state and cache depend on it. Confirm the Memorystore Redis version you select meets this requirement before you create the instance, and record the version in your Terraform variables so later upgrades stay visible in code review.
One worker per pod and its Cloud Run equivalent
LiteLLM recommends one Uvicorn worker per pod on Kubernetes and horizontal scaling for capacity. On Cloud Run the equivalent is one container instance serving requests with a set concurrency, scaled out by the platform. Confirm the worker count in your container start command, the memory and vCPU per instance (LiteLLM suggests 1 vCPU and 4 GiB memory per worker as a starting point), and that concurrency settings do not overload a single worker.
- Starting point per worker
- 1 vCPU, 4 GiB
Region and quota constraints
Cloud Run services, Cloud SQL, Memorystore, the load balancer and the Secret Manager entries must align on regions that meet your data residency terms, and the regions you pick may not offer every feature. Check the project quotas for Cloud Run instances, Cloud SQL connections and Memorystore capacity, and request increases early because they can delay a deployment.
Current release line and support window
The LiteLLM releases page lists v1.105.1, published October 14, 2026. LiteLLM supports the four most recent stable minor versions for both open source and Enterprise deployments. Pin the image tag in Terraform, confirm the current release line on the releases page before go-live, and schedule upgrades so your deployment stays inside that window.
LiteLLM releasesKeeping the Cloud Run deployment upgradable and observable
Day-two work starts with the image tag. In this stack the LiteLLM version is set through Terraform variables, so an upgrade is a reviewed change to the image reference, applied through the same pipeline that created the environment. Keep that change separate from configuration changes so a failed rollout has one cause to investigate. Before you touch the image, read the release notes for the target version and check whether it includes Prisma schema changes against your Cloud SQL PostgreSQL primary. Plan the database migration as its own step with a tested backup and a rollback decision point, because a Cloud Run revision can be rolled back faster than a schema can. Confirm with your team which release line you are on and whether it is still inside the support window described in the vendor's enterprise documentation, since that window drives how often you must upgrade.
Spend and health need watching from the first day. LiteLLM's production guidance suggests batching spend updates to the database every 60 seconds at scale, so expect spend data in Cloud SQL and reports to lag behind live traffic by up to that interval. Build dashboards and alerts on Cloud Run request counts, error rates, instance count and latency, and on Cloud SQL connections and CPU, and on Memorystore memory and evictions. Watch the Cloud Run concurrency setting as well, because scaling follows request concurrency and not token throughput. Route logs to Cloud Logging and set retention on the sink. Test that a failed health check and a database connection error both produce an alert your on-call team will see.
Enterprise support is something to evaluate, not something this stack gives you. LiteLLM Enterprise documents a dedicated channel with the engineering team and optional 24/7 SLAs with a 1 hour response for critical issues and 72 hours for security patches. Ask the vendor to confirm in writing which of these apply to your contract, the severity definitions, whether the SLA covers your self-hosted Cloud Run and Cloud SQL configuration, and how security patches reach you. Compare those terms with your own patching window and with the internal staff who would run an emergency upgrade. Support terms do not replace a tested rollback plan or a named owner for each upgrade.
What DeployOpen needs from your team to start
This sequence settles ownership, network, identity and state decisions before any Terraform runs, so the Cloud Run gateway can be built, reviewed and accepted against written criteria.
Confirm GCP project and billing ownership
Your cloud team names the Google Cloud project that will hold the gateway, the billing account that pays for it, and the people who hold owner and administrator roles. DeployOpen confirms in writing which roles the deployment identity needs, including permission to create networking, Cloud SQL, Memorystore, Secret Manager, Cloud Run and load balancer resources. The step is complete when the project ID, billing account and deployment identity are recorded in the scope document and your security team has approved the role list.
Provide the network and CIDR plan
Your network team supplies the VPC design the gateway must fit into: whether a new VPC is created or an existing one is reused, the subnet ranges, the address range reserved for Private Services Access, and any connectivity to on-premises networks or other projects. DeployOpen checks that the ranges do not overlap with existing routes or with each other. The step closes when a signed-off CIDR table exists and the network owner confirms that no range conflicts with current infrastructure.
Choose the domain and certificate approach
Your team decides the public hostname for the gateway, who controls its DNS zone, and how the global HTTPS load balancer obtains its certificate. Options include a Google-managed certificate or a certificate your organization issues and uploads, and your policy determines which one is acceptable. DeployOpen confirms DNS write access and the certificate owner before the load balancer is defined. The step is complete when the hostname, DNS zone owner and certificate method are written down and the DNS change path is tested.
Name the identity provider for admin SSO
Your identity team selects the provider that will sign administrators into the LiteLLM admin UI. The admin UI supports Google, Microsoft Entra ID, Okta and generic OIDC providers, and SSO on the free tier is limited to 5 users, so the expected number of admin users matters for the edition decision. You provide the client application registration process, the redirect URL pattern and the group or role claims that map to admin access. The step is complete when the provider, admin user count and claim mapping are agreed and the registration owner is named.
Supply model provider credentials through a controlled path
Your AI platform owners list which model providers the gateway will call and who owns each account. Credentials are not sent by email or pasted into code. Instead, you create them in your approved secret handling process or direct DeployOpen to a location where they will be stored in Secret Manager with restricted access. DeployOpen records which secret names exist, which service account can read them and how rotation is handled. The step is complete when each provider has a named owner, a secret location and a documented rotation owner.
Set the Terraform state location and review process
Your platform team chooses where Terraform state is stored, usually a restricted Cloud Storage bucket with versioning and access logging, and who may apply changes. You also define the review path: which people approve pull requests, whether plans are reviewed before apply, and how production changes are separated from testing. DeployOpen configures the backend and documents the apply procedure in the repository. The step closes when the state bucket exists, access is limited to named groups, and one trial plan has been reviewed by your team.
Agree acceptance checks before build
Before the build starts, both teams agree the checks that define a finished deployment. These typically cover a successful Terraform plan with no unexpected deletions, Cloud SQL running with a read replica, Redis reachable only over TLS from the Cloud Run services, secrets read through Secret Manager rather than environment variables, admin SSO working for the approved users, and a test request routed through a virtual key to a provider. DeployOpen writes these checks into the acceptance document. The step is complete when your team signs the list and it becomes the basis for handover.
How DeployOpen works on this
DeployOpen, a Chainscore Labs company, plans and deploys self-hosted LiteLLM inside your own Google Cloud projects, so the gateway, its database, Redis and secrets stay under your control. Each engagement starts with a written scope that defines the Cloud Run, Cloud SQL, Memorystore and load balancer work before any build begins.
How we scope
- We confirm your projects, regions, networking model and which model providers the gateway must reach.
- The written scope lists the Terraform modules, environments, Cloud Run services and load balancer configuration to be delivered.
- We agree on sizing inputs with you, including expected request concurrency and database connection needs, before quoting.
How we build
- We deploy the VPC with Private Services Access, Cloud SQL PostgreSQL with a read replica, and Memorystore Redis with TLS.
- Secret Manager entries, the master key and provider credentials are created and granted to Cloud Run service accounts only.
- We test the global HTTPS load balancer, virtual key creation, budgets, routing and logging against your scoped acceptance criteria.
How we hand over
- You receive the Terraform code, environment configuration and a runbook describing how the stack is deployed and changed.
- We document the decision to use Cloud Run instead of GKE, including the autoscaling limits that apply on Cloud Run.
- Knowledge transfer sessions cover upgrades, secret rotation and how to check gateway health before escalating issues.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Retainers can cover moving to newer supported LiteLLM minor versions and planned Terraform changes.
- Support scope, response expectations and reporting are written into the agreement before work starts.

