Control: Ensure Cloud Asset Inventory is Enabled
Description
GCP Cloud Asset Inventory is services that provides a historical view of GCP resources and IAM policies through a time-series database. The information recorded includes metadata on Google Cloud resources, metadata on policies set on Google Cloud projects or resources, and runtime information gathered within a Google Cloud resource.
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.project_service_cloudasset_api_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.project_service_cloudasset_api_enabled --share
SQL
This control uses a named query:
select name as resource, case when state = 'ENABLED' then 'ok' else 'alarm' end as status, case when state = 'ENABLED' then name || ' Cloud Asset API is enabled.' else name || ' Cloud Asset API is disabled.' end as reason , location as location, project as projectfrom gcp_project_servicewhere name = 'cloudasset.googleapis.com';