GCP Associate Cloud Engineer Practice Question 81: Asset Inventory Org Wide Search
Google Cloud Associate Cloud Engineer · Test 9 · question 1 of 10
A company has dozens of projects spread across several folders under one organization. The security team needs a single command that lists every Compute Engine instance in the entire organization, regardless of which project or folder it lives in, without having to loop over each project individually. Which approach meets this requirement?
Show answer and explanation
Answer:
Cloud Asset Inventory maintains a searchable, near real time index of every resource across an organization, folder, or project. gcloud asset search-all-resources with an organization scope and an asset type filter returns every matching resource in one call, which is exactly the built-in tool for this job.
Option A works but does not scale: it requires iterating over every project by hand and merging output, which is slow and error prone as the org grows. Option C is unrelated; VPC Flow Logs record network traffic, not an inventory of resources, and would not reliably enumerate every instance. Option D reinvents Cloud Asset Inventory with custom code that has to be built, authorized, and maintained, when a single gcloud command already does the job.
Reference: Search for resources