Skip to content

Commit

Permalink
ACM certificate expiry Closes #524 (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
khushboo9024 committed Nov 16, 2022
1 parent 81161a6 commit dd9221c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions query/acm/acm_certificate_expires_30_days.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ select
certificate_arn as resource,
case
when renewal_eligibility = 'INELIGIBLE' then 'skip'
when not_after <= (current_date - interval '30' day) then 'ok'
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_timestamp) || ' days).'
' (' || extract(day from not_after - current_date) || ' days).'
end as reason,
-- Additional Dimensions
region,
account_id
from
aws_acm_certificate;
aws_acm_certificate;

0 comments on commit dd9221c

Please sign in to comment.