GithubHelp home page GithubHelp logo

nicohein / gcp-google-services-firewall-rule Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5 KB

A Cloud Function that deploys and updates a firewall rule allowing access to google services

License: Other

Python 100.00%

gcp-google-services-firewall-rule's Introduction

Automated Firewall Update for Google Services

The goal is to update the firewall rule that allows all VMs to reach all google services but not those from google cloud customers.

According to [Google Suport]](https://support.google.com/a/answer/10026322?hl=en) there are two endpoints from google. One is providing information about all IP ranges announced by Google and one with all ranges used by google could customers.

While the second list of IP ranges is a subset of the first we need to create a diffset which can easily be done using the package netaddr.

The can be updated periodically using cloud scheduler and cloud functions.

For this to work:

  1. a service account used by the cloud function requires 'Deployment Manager Editor' permission.
  2. and the service account used by the scheduler requires permission to invoke the cloud function.

For HTTP:

{
    "project": "xxxx",
    "network": "xxxx",
    "firewall_rule_name": "allow-egress-google-services-automated",
    "firewall_rule_description": ""
}

For PubSub

{
    "data": "a base64 encoded string of the dict above"
}

gcp-google-services-firewall-rule's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.