- Cloud Asset Viewer
- Service Usage Consumer
- Enable Cloud Asset Inventory API
gcloud services enable cloudasset.googleapis.com
- Create a storage bucket for storing the asset inventory output
gsutil mb gs://<your_bucket_name>
- Run inventory report
gcloud asset export ---output-path=gs://<your_bucket_name>/resource_inventory.json \
--content-type=resource \ # content types can be the following: resource, iam-policy, access-policy, org-policy
--project=<your_project_id> \ # --folder or --organization can also be used
- Download the Cloud Foundation Toolkit
# OS X
curl -o cft https://storage.googleapis.com/cft-cli/latest/cft-darwin-amd64
# Linux
curl -o cft https://storage.googleapis.com/cft-cli/latest/cft-linux-amd64
# executable
chmod +x cft
# Windows
curl -o cft.exe https://storage.googleapis.com/cft-cli/latest/cft-windows-amd64
-
Clone this repo
-
RUn the Scorecard
./cft scorecard --policy-path=./guardrails/ \
--bucket=<your_bucket_name>