0

I am running a server on AWS EC2, which runs only for some whitelisted ips. I want to use GCP cloud scheduler for running my cron jobs. So I want to whitelist GCP cloud scheduler request in EC2 server.

I tried google and cloud scheduler documentation, but nothing found regarding ip whitelisting.

Please let me know any way I can achieve this.

1 Answers1

1

In your security group for the instance, allow only the IPs from your GCP service. This will prevent any other IPs from accessing the service.

Rodrigo Murillo
  • 13,080
  • 2
  • 29
  • 50
  • how to allow gcp server in security group. what are the ips of gcp server? – Ravi Prakash Yadav Jan 21 '20 at 15:01
  • You need to determine that by checking the ips of your GCP service. Usually you would set a fixed public IP for the service and use that. See https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address – Rodrigo Murillo Jan 21 '20 at 15:13
  • thanks for the above link. I tried your solution but it didn't worked may be I am doing something wrong. I am using cloud scheduler service, how can i attach static ip for cloud scheduler. I also tried **External IP addresses** but no option to attach with scheduler. – Ravi Prakash Yadav Jan 22 '20 at 02:47
  • Here is discussion regarding the IP ranges for gcp services. See https://stackoverflow.com/questions/59264860/what-is-the-ip-ranges-for-of-cloud-pub-sub-and-cloud-scheduler – Rodrigo Murillo Jan 22 '20 at 03:33