Skip to content

Commit

Permalink
Fix statement_id length (#54)
Browse files Browse the repository at this point in the history
* Fix `statement_id` length

* Update logs_monitoring_cloudwatch_log.tf

Co-authored-by: Jim Park <[email protected]>

---------

Co-authored-by: Jim Park <[email protected]>
  • Loading branch information
jjkoh95 and jim80net authored Jul 20, 2023
1 parent 3e740db commit 1108b07
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 = "${replace(var.cloudwatch_log_groups[count.index], "/", "_")}-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 1108b07

Please sign in to comment.