Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 5eaed73

Browse files
committed
add pass through tagging for lambda function
1 parent 9a730f9 commit 5eaed73

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This Lambda Function forwards subject & body of SNS messages to CloudWatch Log G
3030
``` ruby
3131
module "sns_logger" {
3232
source = "robertpeteuil/sns-to-cloudwatch-logs-lambda/aws"
33-
version = "0.2.5"
33+
version = "0.2.6"
3434

3535
aws_region = "us-west-2"
3636
sns_topic_name = "projectx-logging"
@@ -60,8 +60,8 @@ module "sns_logger" {
6060
| log_group_retention_days | Log Group retention (days) | string | `0` (forever) | no |
6161
| lambda_func_name | Name for Lambda Function | string | `SNStoCloudWatchLogs` | no |
6262
| lambda_description | Lambda Function Description | string | `Route SNS messages to CloudWatch Logs` | no |
63+
| lambda_tags | Mapping of Tags to assign to Lambda function | map | `{}` | no |
6364
| lambda_publish_func | Publish Lambda Function | string | `false` | no |
6465
| lambda_timeout | Function time-out (seconds) | string | `3` | no |
6566
| lambda_mem_size | Function RAM assigned (MB) | string | `128` | no |
6667
| create_warmer_event | Create CloudWatch trigger event to prevent hibernation | string | `false` | no |
67-

main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ resource "aws_lambda_function" "sns_cloudwatchlog" {
3333
log_stream = "${var.log_stream_name}"
3434
}
3535
}
36+
37+
tags = "${var.lambda_tags}"
3638
}
3739

3840
# -----------------------------------------------------------------

variables.tf

+5
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,8 @@ variable lambda_mem_size {
8181
default = 128
8282
description = "Amount of RAM (in MB) assigned to the function. The default (and minimum) is 128MB, and the maximum is 3008MB."
8383
}
84+
85+
variable "lambda_tags" {
86+
description = "A mapping of tags to assign to Lambda Function."
87+
default = {}
88+
}

0 commit comments

Comments
 (0)