Skip to content

Commit 3f98ed3

Browse files
jjkoh95jim80net
andcommitted
fix: Truncate statement_id length after 100 characters (#54)
* Fix `statement_id` length * Update logs_monitoring_cloudwatch_log.tf Co-authored-by: Jim Park <jimp@scribd.com> --------- Co-authored-by: Jim Park <jimp@scribd.com>
1 parent 3e740db commit 3f98ed3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

logs_monitoring_cloudwatch_log.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ resource "aws_cloudwatch_log_subscription_filter" "test_lambdafunction_logfilter
99

1010
resource "aws_lambda_permission" "allow_cloudwatch_logs_to_call_dd_lambda_handler" {
1111
count = length(var.cloudwatch_log_groups)
12-
statement_id = "${replace(var.cloudwatch_log_groups[count.index], "/", "_")}-AllowExecutionFromCloudWatchLogs"
12+
statement_id = "${substr(replace(var.cloudwatch_log_groups[count.index], "/", "_"), 0, 67)}-AllowExecutionFromCloudWatchLogs"
1313
action = "lambda:InvokeFunction"
1414
function_name = aws_cloudformation_stack.datadog-forwarder.outputs.DatadogForwarderArn
1515
principal = "logs.${var.aws_region}.amazonaws.com"

0 commit comments

Comments
 (0)