Skip to content

Commit 4e74819

Browse files
authored
Merge pull request #3064 from kakakakakku/eventbridge-cloudwatch-terraform
eventbridge-cloudwatch-terraform: Update AWS Provider to v6
2 parents cc394e8 + a1ab2ab commit 4e74819

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

eventbridge-cloudwatch-terraform/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ Important: this application uses various AWS services and there are costs associ
3737
3838
## How it works
3939
40-
The AWS SAM template deploys the resources and the IAM permissions required to run the application.
41-
4240
The EventBridge rule specified in `main.tf` filters the events based upon the criteria in the `aws_cloudwatch_event_rule` block. When matching events are sent to EventBridge that trigger the rule, they are delivered as a JSON event payload to CloudWatch Logs.
4341
4442
## Testing

eventbridge-cloudwatch-terraform/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
aws = {
44
source = "hashicorp/aws"
5-
version = "~> 3.27"
5+
version = "~> 6.0"
66
}
77
}
88

@@ -41,7 +41,7 @@ resource "aws_cloudwatch_log_resource_policy" "MyCloudWatchLogPolicy" {
4141
"logs:CreateLogStream",
4242
"logs:PutLogEvents"
4343
],
44-
"Resource": "${aws_cloudwatch_log_group.MyLogGroup.arn}",
44+
"Resource": "${aws_cloudwatch_log_group.MyLogGroup.arn}:*",
4545
"Condition": {
4646
"ArnEquals": {
4747
"aws:SourceArn": "${aws_cloudwatch_event_rule.MyEventRule.arn}"
@@ -73,4 +73,4 @@ resource "aws_cloudwatch_event_target" "MyRuleTarget" {
7373
output "CW-Logs-Stream-Name" {
7474
value = aws_cloudwatch_log_group.MyLogGroup.id
7575
description = "The CloudWatch Log Group Name"
76-
}
76+
}

0 commit comments

Comments
 (0)