Skip to content

Commit

Permalink
Ensure aws_lambda_cronjob module tags all its resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
jareware committed Apr 9, 2019
1 parent 030f6dc commit 9a13cba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aws_lambda_cronjob/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ resource "aws_lambda_function" "local_zipfile" {
timeout = "${var.function_timeout}"
memory_size = "${var.memory_size}"
role = "${aws_iam_role.this.arn}"
tags = "${var.aws_tags}"

environment {
variables = "${var.function_env_vars}"
Expand All @@ -36,6 +37,7 @@ resource "aws_lambda_function" "s3_zipfile" {
timeout = "${var.function_timeout}"
memory_size = "${var.memory_size}"
role = "${aws_iam_role.this.arn}"
tags = "${var.aws_tags}"

environment {
variables = "${var.function_env_vars}"
Expand Down
2 changes: 2 additions & 0 deletions aws_lambda_cronjob/permissions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

resource "aws_iam_role" "this" {
name = "${local.prefix_with_name}"
tags = "${var.aws_tags}"

assume_role_policy = <<EOF
{
Expand Down Expand Up @@ -56,6 +57,7 @@ resource "aws_iam_role_policy_attachment" "this" {
resource "aws_cloudwatch_event_rule" "this" {
name = "${local.prefix_with_name}---scheduled-invocation"
schedule_expression = "${var.schedule_expression}"
tags = "${var.aws_tags}"
}

resource "aws_cloudwatch_event_target" "this" {
Expand Down

0 comments on commit 9a13cba

Please sign in to comment.