Skip to content

Cloud Function to auto update GCP's fireawll IP ranges with Cloudflare

License

Notifications You must be signed in to change notification settings

dlackty/cloudflare-gcp-firewall-update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloudflare-gcp-firewall-update

Using a Cloud Function to automate updating a firewall with Cloudflares IPv4 addresses.

Environment variables

  • key: FIREWALL
  • value: Add your GCP firewall ID

Deploy

You need to create a Cloud Scheduler job that invokes the Pub/Sub trigger:

gcloud pubsub topics create cron-topic
gcloud scheduler jobs create pubsub cloudflare-update --schedule "0 0 * * *" --topic cron-topic

# Then deploy
make deploy topic=cron-topic firewall=FIREWALL_ID project=GCP_PROJECT_ID

License

Copyright (c) 2020-2024 Richard Lee. See LICENSE for details.

About

Cloud Function to auto update GCP's fireawll IP ranges with Cloudflare

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published