Simplify GCP prod Terraform config for minimal, non-HA instances#7
Merged
benjamin-747 merged 3 commits intogitmono-dev:mainfrom Feb 10, 2026
Merged
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>
- Update prod terraform.tfvars.example to favor smallest instance sizes - Use BASIC tier and 1GB for Redis, disable Filestore by default - Configure Cloud SQL with minimal tier, small disk, and zonal (non-HA) availability - Keep testing option to enable public IP while retaining private networking - Remove unnecessary toggles and rely on sane defaults to reduce config noise Signed-off-by: Hongze Gao <15101764808@163.com>
benjamin-747
approved these changes
Feb 10, 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 simplifies the GCP
prodTerraform configuration and adjusts defaults to use the smallest reasonable instance sizes with no HA / replicas, aligning with the course requirement for a cost‑efficient, easy‑to‑understand setup.Key work is focused under
deployment/envs/gcp/prod(and related modules).What’s Changed
1. Prod
terraform.tfvarsand exampleterraform.tfvarsto only the values that must differ per environment:project_id,base_domainterraform.tfvars.exampleto mirror the same structure as prod tfvars but with placeholder values.cloud_sql_enable_private_service_connection = truecloud_sql_enable_public_ip = truevpc_connector_cidrto example (e.g.10.8.0.0/28) so that the Serverless VPC connector can be created without 400 errors.enable_filestore = false2. Instance sizing and HA/replicas
db-f1-micro).ZONAL(non‑HA).BASICinstead ofSTANDARD_HA.3. Networking and VPC Connector
enable_private_networking = true) for Cloud SQL and Redis by default.vpc_connector_cidrto avoid “CIDR required” errors when creating the Serverless VPC Access Connector.modules/gcp/vpc_connector:min_throughput = 200andmax_throughput = 300to satisfy the API’s throughput constraints (multiples of 100 between 200 and 1000 Mbps).Motivation
terraform applywith minimal friction.variables.tfand keep tfvars focused on per‑environment differences only.