diff --git a/main.tf b/main.tf index 4569246e..ea07eea3 100644 --- a/main.tf +++ b/main.tf @@ -25,7 +25,7 @@ locals { sid = "AllowWriteToCloudwatchLogs" effect = "Allow" actions = ["logs:CreateLogStream", "logs:PutLogEvents"] - resources = [replace("${element(concat(aws_cloudwatch_log_group.lambda[*].arn, list("")), 0)}:*", ":*:*", ":*")] + resources = [replace("${element(concat(aws_cloudwatch_log_group.lambda[*].arn, tolist([""])), 0)}:*", ":*:*", ":*")] } lambda_policy_document_kms = { @@ -65,13 +65,13 @@ resource "aws_sns_topic_subscription" "sns_notify_teams" { topic_arn = local.sns_topic_arn protocol = "lambda" - endpoint = module.lambda.this_lambda_function_arn + endpoint = module.lambda.lambda_function_arn filter_policy = var.subscription_filter_policy } module "lambda" { source = "terraform-aws-modules/lambda/aws" - version = "1.28.0" + version = "2.0.0" create = var.create diff --git a/outputs.tf b/outputs.tf index 0a136e86..0b2e0d63 100644 --- a/outputs.tf +++ b/outputs.tf @@ -15,27 +15,27 @@ output "lambda_iam_role_name" { output "notify_teams_lambda_function_arn" { description = "The ARN of the Lambda function" - value = module.lambda.this_lambda_function_arn + value = module.lambda.lambda_function_arn } output "notify_teams_lambda_function_name" { description = "The name of the Lambda function" - value = module.lambda.this_lambda_function_name + value = module.lambda.lambda_function_name } output "notify_teams_lambda_function_invoke_arn" { description = "The ARN to be used for invoking Lambda function from API Gateway" - value = module.lambda.this_lambda_function_invoke_arn + value = module.lambda.lambda_function_invoke_arn } output "notify_teams_lambda_function_last_modified" { description = "The date Lambda function was last modified" - value = module.lambda.this_lambda_function_last_modified + value = module.lambda.lambda_function_last_modified } output "notify_teams_lambda_function_version" { description = "Latest published version of your Lambda function" - value = module.lambda.this_lambda_function_version + value = module.lambda.lambda_function_version } output "lambda_cloudwatch_log_group_arn" {