Architecture Diagram
Terraform Structure
SGP’s GCP infrastructure is provisioned in two separate Terraform phases with different privilege levels:
The main infrastructure Terraform uses a dedicated service account with broad administration roles, including compute, GKE, Cloud SQL, Secret Manager, project IAM, service account keys, Artifact Registry, and Storage administration. Configure the deployment to read the key secret created by
projectsetup/, as described in the deployment guide; then no key file needs to exist on disk during the infrastructure run.
Resources by Type
Compute Resources
Default node pool sizing:
General-purpose pools use
COS_CONTAINERD and are non-preemptible by default (node_pool_config.preemptible=false). The option can enable preemptible nodes for pools that honor it, including the gvisor and gvisor_allow_all sandbox pools. The KubeVirt, Gitea Actions, ClickHouse, OpenSearch, and Temporal system pools are always non-preemptible.
Network Resources
Data & Storage Resources
Both Cloud SQL instances are private-only (no public IP) and connected to the VPC via VPC peering. SSL is enforced for all database connections (
ENCRYPTED_ONLY).
Security Resources
Artifact Resources (projectsetup phase)
Both registries are named
sgp-<workspace_id>-docker-repository and sgp-<workspace_id>-helm-repository.
Monitoring Resources
Network Architecture
Address Space
Traffic Flow
Ingress (External):GKE Configuration
Cluster Features
Workload Identity
GKE pods authenticate to GCP services using Workload Identity rather than node-level service account keys. Kubernetes service accounts are bound to GCP service accounts via the workload identity pool:Secret Manager Secrets
Key secrets provisioned by Terraform:
The
secret_name_prefix variable (typically sgp-<workspace_id>) scopes secrets for deployments in shared GCP projects.
Customer Managed Encryption Keys (CMEK)
WhenuseCustomerManagedEncryptionKey = true, Terraform provisions a Cloud KMS key ring and symmetric encryption key:
The key is applied to:
- Cloud SQL instances (both main and Temporal)
- GCS buckets