-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial add of ACM resource * Add alarms & event subs for ACM * Bump version to 0.11.5 * Add default generation of specifed event subs * Bump version to 0.11.6
- Loading branch information
1 parent
af2be86
commit 144780c
Showing
7 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module CfnGuardian::Resource | ||
class Acm < Base | ||
|
||
def default_alarms | ||
alarm = CfnGuardian::Models::AcmAlarm.new(@resource) | ||
alarm.name = 'CertificateExpiry' | ||
alarm.metric_name = 'DaysToExpiry' | ||
alarm.statistic = 'Average' | ||
alarm.threshold = 30 | ||
alarm.comparison_operator = 'LessThanThreshold' | ||
alarm.evaluation_periods = 1 | ||
alarm.period = 86400 | ||
@alarms.push(alarm) | ||
end | ||
|
||
def default_event_subscriptions() | ||
event_subscription = CfnGuardian::Models::AcmEventSubscription.new(@resource) | ||
event_subscription.name = 'AcmCertificateNearExpiry' | ||
event_subscription.detail_type = 'ACM Certificate Approaching Expiration' | ||
event_subscription.source = 'aws.acm' | ||
event_subscription.detail = { | ||
'DaysToExpiry' => [31] | ||
} | ||
@event_subscriptions.push(event_subscription) | ||
|
||
event_subscription = CfnGuardian::Models::AcmEventSubscription.new(@resource) | ||
event_subscription.name = 'AcmCertificateExpired' | ||
event_subscription.detail_type = 'ACM Certificate Expired' | ||
event_subscription.source = 'aws.acm' | ||
@event_subscriptions.push(event_subscription) | ||
|
||
event_subscription = CfnGuardian::Models::AcmEventSubscription.new(@resource) | ||
event_subscription.name = 'AcmRenewalActionRequired' | ||
event_subscription.detail_type = 'ACM Certificate Renewal Action Required' | ||
event_subscription.source = 'aws.acm' | ||
@event_subscriptions.push(event_subscription) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module CfnGuardian | ||
VERSION = "0.11.5" | ||
VERSION = "0.11.6" | ||
CHANGE_SET_VERSION = VERSION.gsub('.', '-').freeze | ||
end |