turbot/terraform_azure_compliance

Query: iam_no_custom_subscription_owner_roles_created

Usage

powerpipe query terraform_azure_compliance.query.iam_no_custom_subscription_owner_roles_created

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'permissions' -> 'actions') @> '["*"]' then 'alarm'
else 'ok'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'permissions' -> 'actions') @> '["*"]' then 'has custom owner roles'
else ' does not have custom owner roles'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_role_definition';

Controls

The query is being used by the following controls: