Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Updated eventbridge local values #14

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eventbridge_rules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "aws_cloudwatch_event_rule" "this" {

name = each.key
description = each.value.description
state = each.value.enabled
state = each.value.state

event_bus_name = "default"
event_pattern = each.value.event_pattern
Expand Down
12 changes: 6 additions & 6 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ locals {
default_eventbridge_rules = {
"aws-cloudwatch-alarm-notification-rule" : {
"description" : "Monitor state changes of CloudWatch alarms.",
"enabled" : true,
"state" : "ENABLED",
"event_pattern" : jsonencode({
"source" : ["aws.cloudwatch"],
"detail-type" : ["CloudWatch Alarm State Change"]
})
},
"aws-healthdashboard-notification-rule" : {
"description" : "Monitor state AWS Health Dashboard changes.",
"enabled" : true,
"state" : "ENABLED",
"event_pattern" : jsonencode({
"source" : ["aws.health"],
"detail-type" : ["AWS Health Event"],
Expand All @@ -29,7 +29,7 @@ locals {
},
"aws-config-notification" : {
"description" : "Notifies of AWS Config items going out compliancy.",
"enabled" : true,
"state" : "ENABLED",
"event_pattern" : jsonencode({
"source" : ["aws.config"]
"detail.eventName" : ["PutEvaluations"]
Expand All @@ -47,7 +47,7 @@ locals {
},
"aws-backup" : {
"description" : "Notifies of AWS Backups failing.",
"enabled" : true,
"state" : "ENABLED",
"event_pattern" : jsonencode({
"source" : ["aws.backup"],
"detail-type" : ["Backup Job State Change", "Copy Job State Change"],
Expand All @@ -58,7 +58,7 @@ locals {
},
"aws-backup-cloudtrail" : {
"description" : "Notifies of AWS Backups failing through CloudTrail events.",
"enabled" : true,
"state" : "ENABLED",
"event_pattern" : jsonencode({
"source" : ["aws.backup"],
"detail-type" : ["AWS Service Event via CloudTrail"],
Expand All @@ -69,7 +69,7 @@ locals {
},
"aws-ssm-patch-manager" : {
"description" : "Notifies when SSM patch manager fails."
"enabled" : true,
"state" : "ENABLED",
"event_pattern" : jsonencode({
"source" : ["aws.ssm"],
"detail-type" : ["EC2 Command Invocation Status-change Notification", "EC2 State Manager Instance Association State Change"],
Expand Down
Loading