Skip to content

Commit

Permalink
fix: limit statement_id length to 100 chars
Browse files Browse the repository at this point in the history
Update logs_monitoring_cloudwatch_log.tf

Co-authored-by: Jim Park <[email protected]>
  • Loading branch information
jjkoh95 and jim80net committed Jul 11, 2023
1 parent c444732 commit 6c32ece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logs_monitoring_cloudwatch_log.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ resource "aws_cloudwatch_log_subscription_filter" "test_lambdafunction_logfilter

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

0 comments on commit 6c32ece

Please sign in to comment.