GcpComputeHandler
) provides methods to collect detailed information about Compute resources for governance, auditing, and monitoring purposes.
It authenticates using a GCP service account and leverages the Google Cloud SDK (google-cloud-compute
) to fetch data.
Example
To create theGcpComputeHandler
object with your service account:
Retrieve details of all VM instances in a project or specific zone.
Fetch persistent disk information across all zones or a specific zone.
Get all VPC networks within a project.
Retrieve subnetworks across all regions or a specific region.
Fetch firewall rules that define ingress/egress traffic control for resources.
Retrieve custom images created in the project.
Fetch disk snapshots for backup and disaster recovery.
Retrieve a comprehensive dictionary with all compute resources (instances, disks, networks, subnetworks, firewalls, images, and snapshots).