Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud run different IP request

Hello,

I have deployed on cloud run a specific job that execute more request to internet site each 6 hours.

Is there a way to assign a different IP for each job that i create into cloud run?

Thanks

Best

Solved Solved
1 3 1,335
1 ACCEPTED SOLUTION

Here's the thing.  I think you'll want to check with Google Cloud's agreement/policies about reaching out without approval to external web sites or other Internet properties.  My gut says that is not allowed.  Google maintains a large range of IP addresses for external facing applications.  These IP addresses are allocated to Google Cloud projects and services.  If you use an IP address just now you may be given a new IP address if you release it and ask for a new one.  That means that some other Google Cloud consumer may end up with the IP address you previously had.

If you are sending outbound requests and there is a notion in your mind that your requests could be blocked/banned then you shouldn't be using Google Cloud for those activities.

View solution in original post

3 REPLIES 3

I think you are saying that you have a Cloud Run service that is executed periodically (every 6 hours) and it makes an outbound (to Internet) request.  I think you are asking if the IP address that Cloud Run originated outbound requests can be changed?  Is this correct?  If I may ask, what is prompting the desire for a different apparent source IP address for each request?

Hi kolban,

thanks for your reply. You anderstood my question and my workflow. I need to modify the IP for each task because i will have more than one job into cloud run, that scrape some data and using different IP I can prevent that some continous request could be banned.

Also i'm trying to calculate cost using the cloud pricing calculator. With this tool i can calculate the price for one job, but in my workflow i will have more than one job crated dynamically using google cloud run api. In this case how can I calculate the price?

Thanks for your help and your time

Thanks

 

 

 

Here's the thing.  I think you'll want to check with Google Cloud's agreement/policies about reaching out without approval to external web sites or other Internet properties.  My gut says that is not allowed.  Google maintains a large range of IP addresses for external facing applications.  These IP addresses are allocated to Google Cloud projects and services.  If you use an IP address just now you may be given a new IP address if you release it and ask for a new one.  That means that some other Google Cloud consumer may end up with the IP address you previously had.

If you are sending outbound requests and there is a notion in your mind that your requests could be blocked/banned then you shouldn't be using Google Cloud for those activities.