Skip to content

Commit

Permalink
feat: Added terraform-aws-modules tag
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko committed Jun 7, 2024
1 parent 4f77bfc commit 3f135c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.89.1
rev: v1.91.0
hooks:
- id: terraform_fmt
- id: terraform_wrapper_module_for_each
Expand Down
10 changes: 7 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ resource "aws_lambda_function" "this" {
}
}

tags = merge(var.tags, var.function_tags)
tags = merge(
{ terraform-aws-modules = "lambda" },
var.tags,
var.function_tags
)

depends_on = [
null_resource.archive,
Expand Down Expand Up @@ -194,7 +198,7 @@ resource "aws_s3_object" "lambda_package" {
server_side_encryption = var.s3_server_side_encryption
kms_key_id = var.s3_kms_key_id

tags = var.s3_object_tags_only ? var.s3_object_tags : merge(var.tags, var.s3_object_tags)
tags = var.s3_object_tags_only ? var.s3_object_tags : merge({ terraform-aws-modules = "lambda" }, var.tags, var.s3_object_tags)

dynamic "override_provider" {
for_each = var.s3_object_override_default_tags ? [true] : []
Expand Down Expand Up @@ -224,7 +228,7 @@ resource "aws_cloudwatch_log_group" "lambda" {
skip_destroy = var.cloudwatch_logs_skip_destroy
log_group_class = var.cloudwatch_logs_log_group_class

tags = merge(var.tags, var.cloudwatch_logs_tags)
tags = merge({ terraform-aws-modules = "lambda" }, var.tags, var.cloudwatch_logs_tags)
}

resource "aws_lambda_provisioned_concurrency_config" "current_version" {
Expand Down

0 comments on commit 3f135c4

Please sign in to comment.