Skip to content

Instantly share code, notes, and snippets.

@hervekhg
Created January 17, 2020 16:23
Show Gist options
  • Save hervekhg/e93cabf3a27c1bbaeeab9cded5f91198 to your computer and use it in GitHub Desktop.
Save hervekhg/e93cabf3a27c1bbaeeab9cded5f91198 to your computer and use it in GitHub Desktop.
resource "aws_cloudwatch_event_rule" "daily" {
name = "daily_enforce_bucket_kms_encryption"
description = "run everyday"
#schedule_expression = "${var.cron_schedule_enforce_bucket_encryption} "
event_pattern = <<PATTERN
{
"source": [
"aws.s3"
],
"detail-type": [
"AWS API Call via CloudTrail"
],
"detail": {
"eventSource": [
"s3.amazonaws.com"
],
"eventName": [
"CreateBucket"
]
}
}
PATTERN
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment