Skip to content

Commit

Permalink
replace sns variables to lambda based on TF variables
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Mar 8, 2022
1 parent 58e6b8c commit a7590e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ resource "aws_lambda_function" "lambda" {
environment {
variables = merge(
local.lambda_environment_variables,
tomap({ "tf_module_version" = local._module_version }),
{
"tf_module_version" = local._module_version
SnsEnable = var.create && var.enable_sns
SnsTopicArn = var.create && var.enable_sns ? aws_sns_topic.topic[0].arn : null
}
)
}
timeouts {}
Expand Down

0 comments on commit a7590e2

Please sign in to comment.