Skip to content
forked from sosimon/gcp-ips

Tool to list all IPs in-use (or reserved) in Shared VPC subnets

Notifications You must be signed in to change notification settings

husunal/gcp-ips

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

gcp-ips

Motivation

Currently (November 2018), there is no easy way to list all IPs in-use (or reserved but not in-use) in a particular subnet in a shared VPC. IP addresses are attached to resources (e.g. an instance or a forwarding rule) which are listed in service projects. This means that one has to scan through all service projects exhaustively, collect all IPs in-use or reserved, and then organize them by subnets

Setup

Follow the recommended authentication method described here

Basically:

export GOOGLE_APPLICATION_CREDENTIALS=<path to service account key>

Run

go run main.go <host-project>

Todo

  • command line arguments
    • options for console output and/or markdown files
  • calculate statistics (number of available and used IPs)
  • better feedback for permission issues accessing projects

About

Tool to list all IPs in-use (or reserved) in Shared VPC subnets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%