This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
GCP Load Balancer Inventory (org-wide) | |
------------------------------------- | |
Finds all load balancers across an ORGANIZATION using Cloud Asset Inventory (CAI) | |
and, when needed, the Compute Engine API. It outputs a JSON file with, for each | |
load balancer (derived from Forwarding Rules), the frontend (ingress) IPs and | |
best-effort backend (egress) IPs (e.g., instance/NEG endpoint IPs). |