Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support Terraform 0.15 #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down