feat(gcp): implement Cloud Run deployment with HTTPS Load Balancer and Private Networking#6
Merged
benjamin-747 merged 2 commits intogitmono-dev:mainfrom Feb 9, 2026
Conversation
- Introduce a load balancer module to create Serverless NEGs and backend services for Cloud Run - Add URL map host/path routing for buck2hub.com with explicit LFS prefixes (/api/v1, /info/lfs) - Wire LB module into gcp/prod and expose outputs for LB IP and DNS authorization records - Update prod variables and tfvars example for domain and routing settings Signed-off-by: Hongze Gao <15101764808@163.com>
- Add a commented-out example for public Cloud SQL access during testing Signed-off-by: Hongze Gao <15101764808@163.com>
Contributor
Author
|
benjamin-747
approved these changes
Feb 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR transitions the GCP deployment from GKE to a fully managed Cloud Run architecture. It introduces a modular HTTPS Load Balancer with Certificate Manager support, enabling a secure, scalable, and low-maintenance environment for Mega. Key features include host/path-based routing, private connectivity to Cloud SQL/Redis via VPC Connector, and support for Google-managed SSL certificates.
Key Changes
Compute & Routing
mega-backend(mono) andmega-ui(Next.js) as independent Cloud Run services./api/v1/*and/info/lfs/*(Git LFS) to the backend./*) to the UI.buck2hub.com).Networking & Security
googleprovider v7+ (variable blocks anddynamic "env"blocks).Documentation & Config
terraform.tfvars.examplewith Cloud Run, LB, and ECR Public image configurations.