From acd2d081ffc00e7ecd6ec7e71c8142875aa96dc2 Mon Sep 17 00:00:00 2001 From: Nylre Jel Ortega Date: Fri, 7 Apr 2023 19:49:38 +0800 Subject: [PATCH] docs: Add lambda_function_arn format for lambda_function_name --- main.tf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 4748a6a..64de078 100644 --- a/main.tf +++ b/main.tf @@ -142,7 +142,9 @@ locals { ])...) # Filter out the attachments for lambda functions. The ALB target group needs permission to forward a request on to - # the specified lambda function. This filtered list is used to create those permission resources + # the specified lambda function. This filtered list is used to create those permission resources. + # To get the lambda_function_name, the 6th index is taken from the lambda_function_arn format below + # arn:aws:lambda:::function:my-function-name: target_group_attachments_lambda = { for k, v in local.target_group_attachments : (k) => merge(v, { lambda_function_name = split(":", v.target_id)[6] })