Created
March 22, 2023 16:37
-
-
Save johnybradshaw/422d2946798e9fcd0e714301bd292783 to your computer and use it in GitHub Desktop.
Google Asset Query (https://console.cloud.google.com/iam-admin/asset-inventory/query) to extract all components for licensing in Wiz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Google Asset Query (https://console.cloud.google.com/iam-admin/asset-inventory/query) | |
# This extracts all components for licensing in Wiz | |
SELECT | |
assetType, | |
COUNT(*) AS cnt | |
FROM | |
STANDARD_METADATA | |
WHERE | |
assetType IN | |
('compute.googleapis.com/Instance', | |
'sqladmin.googleapis.com/Instance', | |
'k8s.io/Node', | |
'storage.googleapis.com/Bucket', | |
'cloudfunctions.googleapis.com/Function', | |
'cloudfunctions.googleapis.com/CloudFunction', | |
'run.googleapis.com/Service') | |
GROUP BY | |
assetType | |
ORDER BY | |
cnt desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment