turbot/terraform_aws_compliance

Query: iam_password_policy_expire_90

Usage

powerpipe query terraform_aws_compliance.query.iam_password_policy_expire_90

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'max_password_age') is null then 'alarm'
when (attributes_std -> 'max_password_age')::integer <= 90 then 'ok'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when (attributes_std -> 'max_password_age') is null then ' password expiration not set'
when (attributes_std -> 'max_password_age')::integer <= 90 then ' password expiration set to ' || (attributes_std ->> 'max_password_age') || ' days'
else ' password expiration set to ' || (attributes_std ->> 'max_password_age') || ' days'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_iam_account_password_policy';

Controls

The query is being used by the following controls: