If you need a consolidated list of your GCP components, these scripts can help you :)
Based on the python GCP SDK, you can check a list(*.csv) of components (GCE, GKE, ClouSQL, Quota) of all the projects that you have access to, including some key properties that can help you to review operational analysis.
After you download or clone the repository, install the pip requirements, and run the list* script related to the components you want to check.
pip install -r requirements.txt
Set your GCP credentials. ReferenceGCP Default Credentials
export GOOGLE_APPLICATION_CREDENTIALS=/your-dir/your-credential.json
Permissions required:
- cloudsql.instances.list
- compute.instances.list
- compute.zones.list
- container.clusters.list
- resourcemanager.projects.get
If you review how to create a service account and JSON, please check the link Creating and managing service account keys.
You can use the --project parameter to define a project_id filter. If the parameter is empty, all the active project_ids that the credential has access will be listed.
python3 list-gce.py
or
python3 list-gce.py --project my-project-id
List the VPC components in a CSV format.
List the GCE components in a CSV format.
List the GKE components in a CSV format.
List the GKE Node components in a CSV format.
List the CloudSQL components in a CSV format.
List the project Quotas in a CSV format.
List the project Quotas, regional level, in a CSV format.
List public GCP incidents based in a CSV format, based on GCP Status page
- PubSub scripts
- MemoryStore scripts
- Review Project filter to support comma delimited
- Review GKE subnet sizing