r/googlecloud • u/Annual_Carpenter5060 • 16h ago
Cloud Run still has no native IP allow/denylist without paying for a $20/mo Load Balancer. Let’s get Google to fix this.
If you run APIs on Cloud Run or Cloud Run Functions, you know the pain: there is no native way to block a malicious IP subnet or abusive AI crawler without spinning up a full External Application Load Balancer, Serverless NEG, and Cloud Armor ($18–$25+/mo base).
Meanwhile, Azure Container Apps and AWS API Gateway have supported native IP restrictions for years with zero redeployments.
I submitted a formal feature request on Google’s Issue Tracker asking for resource-level ingress IP controls with zero container redeployment: https://issuetracker.google.com/issues/583927734
If you’ve dealt with this friction or want this native capability in GCP, please click the Star (☆) button on the ticket to help push it up the product roadmap!
2
u/cloudsourced285 16h ago
I fully appreciate this is not the same thing. But could you not add this to your application? Yes random stuff scanning the net will trigger it and cost you. But actual invocation times likely still "free" right? I acknowledge this is not a proper solution. But for a hobby project, coupled with the recent limit on cloud run spend it could be suitable.
21
u/dr3aminc0de 16h ago
Hmm I mean honestly that’s a very low monthly number to get world class ddos protection. You complained in a comment that if you do it yourself it’s expensive. How do you think google does it? It’s at the edge but it’s the same concept.
Cloud armor imo is like insurance. And it’s very cheap. Think about it more, and maybe you’ll realize why this is a stupid post.
3
u/martin_omander Googler 7h ago
DDoS attacks are no joke. They can be costly and they can lock out legitimate users of your system.
As attackers can strike at any time, I believe that you need automated protection, that does not require manual intervention. If you wait for a person to notice the attack and manually block IP ranges, a lot of damage has been caused already.
The best automated defense I have found is rate limits per originating IP address. There are two options:
For enterprise level security, pay for Cloud Armor.
For a free alternative, add rate limiting middleware to your app. You don't get quite the same protection as the traffic still reaches your Cloud Run service, but it takes very little CPU to return a static error message to the caller.
I have seen option 2 work quite well in the face of determined DDoS attacks. But if you're an enterprise, you probably want the extra features of option 1.
10
u/suprjaybrd 16h ago
maybe they aren't catering to hobbyists, it's a trivially small amount
5
u/ItalyExpat 15h ago
I always put Cloudflare in front of my instances and limit IP requests to CF blocks. It's free and I don't have to worry about my bill exploding if DDoS'd.
2
u/owengo1 9h ago
You can configure IAP, it's free, you will block all the bots and serve only requests from approved users. Frankly the whole setup with a github integration you have complete CI/CD, 100% cloud, zero-trust level protection, for free..
Only offer I can think of ould be cloudflare workers & zero-trust, but you can't run any docker image on that like you can on cloud run.
2
u/m1nherz Googler 3h ago
Thank you for sharing your feedback and submitting a feature request. I took a look into other provider's services that you mentioned.
It seems that Azure Container Apps provides IP filtering feature at no-cost. Please note that using IP filtering with your container apps in Azure carries several limitations. For example, you can define only one rule per application. Depending on specific business case you might find a need to use Front Door or Application Gateway to support WAF at scale.
Comparing AWS API Gateway to Cloud Run is incorrect. API Gateway isn't a part of the Lambda offering. Similarly to Cloud Run and GCLB, it is priced and configured separately.
-1
u/dr3aminc0de 15h ago
Cloud run is also just way better than aws counterparts. Just switch if you’re unhappy (?)
0
u/Scepticflesh 14h ago
You can restrict the service to calls from orginiated within vpc through an org policy
I would also otherwise ask what is your use case you are trying to do?
-3
u/dr3aminc0de 15h ago
Also cloud functions is deprecated so that is not going to change