turbot/gcp_compliance

Query: iam_api_key_restricts_apis

Usage

powerpipe query gcp_compliance.query.iam_api_key_restricts_apis

Steampipe Tables

SQL

select
'https://iam.googleapis.com/v1/projects/' || project || '/apikeys/' || name as resource,
case
when restrictions -> 'apiTargets' is null then 'alarm'
else 'ok'
end as status,
case
when restrictions -> 'apiTargets' is null then title || ' API key is not restricted to required APIs.'
else title || ' API key is restricted to only required APIs.'
end as reason
, location as location, project as project
from
gcp_apikeys_key;

Controls

The query is being used by the following controls: