turbot/alicloud_insights

Query: ram_roles_allow_admin_action

Usage

powerpipe query alicloud_insights.query.ram_roles_allow_admin_action

Steampipe Tables

SQL

with admin_role_access as (
select
distinct name
from
alicloud_ram_role,
jsonb_array_elements(attached_policy) as policies
where
policies ->> 'PolicyName' = 'AdministratorAccess'
)
select
case
when a.name is null then 'no admin access' else 'with admin access' end as status,
count(*)
from
alicloud_ram_role as r
left join admin_role_access as a on r.name = a.name
group by
status;

Dashboards

The query is used in the dashboards: