Skip to content

Commit a9f4367

Browse files
committed
fix: Update VPC egress settings on GCP to only capture internal traffic
For social auth or SSO, we need to be able to make requests to external servers. setting the vpc_access.egress to ALL_TRAFFIC caused all traffic to be routed to the VPC, which had no outbound rules. We only need the VPC so that the services and jobs can access the DB and cache servers.
1 parent c9cf423 commit a9f4367

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

infra/gcp/modules/shareabouts-service/jobs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ resource "google_cloud_run_v2_job" "migrate" {
77
service_account = google_service_account.sa.email
88
vpc_access {
99
connector = var.vpc_connector_id
10-
egress = "ALL_TRAFFIC"
10+
egress = "PRIVATE_RANGES_ONLY"
1111
}
1212

1313
containers {

infra/gcp/modules/shareabouts-service/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ resource "google_cloud_run_v2_service" "default" {
187187
service_account = google_service_account.sa.email
188188
vpc_access {
189189
connector = var.vpc_connector_id
190-
egress = "ALL_TRAFFIC"
190+
egress = "PRIVATE_RANGES_ONLY"
191191
}
192192

193193
containers {

0 commit comments

Comments
 (0)