Simple python tools to automate several routine Cloud Asset Inventory task including see identity permission, compare two identity permission & get all resource which have public access.
- python >= v3.x
- pip
- google-cloud-asset library
- prettytable
- colorama
- py-linq
It’s recommended to run this tools in virtual environment to avoid dependency conflict with other project, but it can also run in global environment.
Create new virtual environment for the tools run
virtualenv <your-venv-name>
Activate the virtual environment
source <your-venv-name>/bin/activate
Install all dependency
<your-venv-bame>/bin/pip install -r requirements.txt
Generate new Service Account that tool will used from gcloud console, download, then enter the absolute path of the downloaded key by running this command
<your-venv-name>/bin/python3 caitools.py --init-auth
Run the tools
<your-venv-name>/bin/python3 caitools.py --help
Done !
To exit from virtual environment just type
exit
command
Install all dependency
pip install -r requirements.txt
Generate new Service Account that tool will used from gcloud console, download, then enter the absolute path of the downloaded key by running this command
python3 caitools.py --init-auth
Run the tools
python3 caitools.py --help
Done !