turbot/steampipe-mod-azure-compliance

Query: storage_account_key_rotation_reminder_enabled

Usage

powerpipe query azure_compliance.query.storage_account_key_rotation_reminder_enabled

SQL

select
sa.id as resource,
case
when key_policy is null then 'alarm'
when key_policy ->> 'keyExpirationPeriodInDays' = '90' then 'ok'
else 'alarm'
end as status,
case
when key_policy is null then sa.name || ' key rotation reminder disabled.'
else sa.name || ' key rotation reminder enabled for ' || (key_policy ->> 'keyExpirationPeriodInDays') || ' days.'
end as reason
, sa.resource_group as resource_group
, sub.display_name as subscription
from
azure_storage_account sa,
azure_subscription sub
where
sub.subscription_id = sa.subscription_id;

Controls

The query is being used by the following controls: