Skip to content

Commit

Permalink
add pass through tagging for lambda function
Browse files Browse the repository at this point in the history
  • Loading branch information
robertpeteuil committed Oct 15, 2018
1 parent 9a730f9 commit 5eaed73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This Lambda Function forwards subject & body of SNS messages to CloudWatch Log G
``` ruby
module "sns_logger" {
source = "robertpeteuil/sns-to-cloudwatch-logs-lambda/aws"
version = "0.2.5"
version = "0.2.6"

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

2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ resource "aws_lambda_function" "sns_cloudwatchlog" {
log_stream = "${var.log_stream_name}"
}
}

tags = "${var.lambda_tags}"
}

# -----------------------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,8 @@ variable lambda_mem_size {
default = 128
description = "Amount of RAM (in MB) assigned to the function. The default (and minimum) is 128MB, and the maximum is 3008MB."
}

variable "lambda_tags" {
description = "A mapping of tags to assign to Lambda Function."
default = {}
}

0 comments on commit 5eaed73

Please sign in to comment.