turbot/aws_compliance

Query: acm_certificate_not_expired

Usage

powerpipe query aws_compliance.query.acm_certificate_not_expired

Steampipe Tables

SQL

select
certificate_arn as resource,
case
when renewal_eligibility = 'INELIGIBLE' then 'skip'
when date(not_after) < (current_date - interval '1' minute) then 'alarm'
else 'ok'
end as status,
case
when renewal_eligibility = 'INELIGIBLE' then title || ' not eligible for renewal.'
when date(not_after) < (current_date - interval '1' minute) then title || ' expired ' || to_char(not_after, 'DD-Mon-YYYY') ||
' (' || extract(day from not_after - current_date) || ' days ago).'
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: