Suporte Turimsoft
Suporte Turimsoft

Reputation: 31

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?

Upvotes: 3

Views: 944

Answers (1)

DazWilkin
DazWilkin

Reputation: 40061

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

Upvotes: 7

Related Questions