Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
chinchalinchin committed Aug 1, 2023
1 parent 9558dbd commit bc153ea
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,21 @@ locals {
# note: construct lambda arn before to prevent dependency cycles, i.e.
# notification_policy(lambda) -> lambda(sns) -> sns(notification_policy)
# -> ad infinitum.
function_name_format_short = replace(replace(var.lambda.function_name, "/", "-"), var.namespace, "")
function_name_format_short = trimsuffix(
trimprefix(
replace(
replace(
var.lambda.function_name,
"/",
"-"
),
var.namespace,
""
),
"_"
),
"_"
)
lambda_arn = "arn:aws:lambda:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:function:${var.lambda.function_name}:*"

# Calculations
Expand Down

0 comments on commit bc153ea

Please sign in to comment.