Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list GCP projects with a particular API enabled

Is it possible to take a a list of all projects in a organization that uses a specific API, e.g Cumpute Engine API?

like image 203
Suporte Turimsoft Avatar asked Oct 30 '25 17:10

Suporte Turimsoft


1 Answers

Cloud Asset Inventory should help.

It's a slightly confusing interface but try:

ORG=[[YOUR-ORG-ID]]

gcloud asset search-all-resources \
--scope=organizations/${ORG} \
--asset-types=serviceusage.googleapis.com/Service \
--query=name:compute.googleapis.com
like image 102
DazWilkin Avatar answered Nov 01 '25 09:11

DazWilkin