https://github.com/signiant/gcp-instance-auditor
List all instances in Google Cloud, sorted by project
https://github.com/signiant/gcp-instance-auditor
Last synced: 4 days ago
JSON representation
List all instances in Google Cloud, sorted by project
- Host: GitHub
- URL: https://github.com/signiant/gcp-instance-auditor
- Owner: Signiant
- License: mit
- Created: 2020-07-13T18:56:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-16T13:26:25.000Z (almost 6 years ago)
- Last Synced: 2025-03-05T13:49:02.449Z (about 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Audit: audit.py
Awesome Lists containing this project
README
# gcp-instance-auditor
List all instances in Google Cloud, sorted by project. You can filter by a folder number
This script can be run directly, or from the Docker container.
You can either mount in a service account JSON file, or mount in your local credentials.
# Usage Examples:
`docker run --rm -t -v ~/Downloads/service-account.json:/root/service-account.json:ro signiant/gcp-instance-auditor --folder 210998941515 --account /root/service-account.json`
`docker run --rm -t -v ~/.config/gcloud:/root/.config/gcloud:ro signiant/gcp-instance-auditor --folder '210998941515 71318573357'`
Flags:
--folder *GCP folder(s) to limit your search. If not given, will default to all projects*
--account *service account JSON file to use to authenticate. If not supplied, use default application credentials*
Credentials in ~/.config/gcloud are created by the gcloud cli tool
`gcloud auth application-default login`