turbot/aws_compliance

Query: acm_certificate_expires_30_days

Usage

powerpipe query aws_compliance.query.acm_certificate_expires_30_days

Steampipe Tables

SQL

select
certificate_arn as resource,
case
when renewal_eligibility = 'INELIGIBLE' then 'skip'
when date(not_after) - date(current_date) >= 30 then 'ok'
else 'alarm'
end as status,
case
when renewal_eligibility = 'INELIGIBLE' then title || ' not eligible for renewal.'
else title || ' expires ' || to_char(not_after, 'DD-Mon-YYYY') ||
' (' || extract(day from not_after - current_date) || ' days).'
end as reason
, region, account_id
from
aws_acm_certificate;

Controls

The query is being used by the following controls: