Notes
open one at a time
1.What it can cause
Payments fail when PayGate sees an address it does not know - and the failures come and go with deploys and scaling, which makes them slow to trace.
- Payments fail when PayGate sees an address it does not know - and the failures come and go with deploys and scaling, which makes them slow to trace.
- Internet calls never enter the VPC, so its routes, Cloud NAT and every egress firewall rule are skipped. D9's fix would not apply to Cloud Run at all.
2.Why it is wrong
Cloud Run egress modes. private-ranges-only reaches your database fine, which is why the broken payment path goes unnoticed - only all-traffic gives a stable egress IP.
The service reaches the private database fine, which is why nobody noticed. But PayGate sees an unpredictable source address, so whitelisting silently fails after a redeploy.
The idea
Cloud Run egress modes. private-ranges-only reaches your database fine, which is why the broken payment path goes unnoticed - only all-traffic gives a stable egress IP.
Learn it
3.How you would find it
gcloud run services describe harbour-api --region=asia-southeast1 --format=yaml | grep -E "vpc-access-egress|network-interfaces"
gcloud run services describe harbour-api --region=asia-southeast1 \ --format=yaml | grep -E "vpc-access-egress|network-interfaces"4.The change that closes it
--vpc-egress=all-traffic - internet-bound traffic routes through Cloud NAT
- As found
- --vpc-egress=private-ranges-only
- Fixed
- --vpc-egress=all-traffic - internet-bound traffic routes through Cloud NAT
gcloud run services update harbour-api \ --region=asia-southeast1 \ --network=harbour-vpc --subnet=sn-a-app \ --vpc-egress=all-traffic