Skip to content

Commit 685af53

Browse files
sebastianczechantonbabenko
andauthoredJan 26, 2025··
fix: Make default tag terraform-aws-modules optional (#657)
Co-authored-by: Anton Babenko <anton@antonbabenko.com>
1 parent de6ae34 commit 685af53

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@ No modules.
797797
| <a name="input_image_config_entry_point"></a> [image\_config\_entry\_point](#input\_image\_config\_entry\_point) | The ENTRYPOINT for the docker image | `list(string)` | `[]` | no |
798798
| <a name="input_image_config_working_directory"></a> [image\_config\_working\_directory](#input\_image\_config\_working\_directory) | The working directory for the docker image | `string` | `null` | no |
799799
| <a name="input_image_uri"></a> [image\_uri](#input\_image\_uri) | The ECR image URI containing the function's deployment package. | `string` | `null` | no |
800+
| <a name="input_include_default_tag"></a> [include\_default\_tag](#input\_include\_default\_tag) | Set to false to not include the default tag in the tags map. | `bool` | `true` | no |
800801
| <a name="input_invoke_mode"></a> [invoke\_mode](#input\_invoke\_mode) | Invoke mode of the Lambda Function URL. Valid values are BUFFERED (default) and RESPONSE\_STREAM. | `string` | `null` | no |
801802
| <a name="input_ipv6_allowed_for_dual_stack"></a> [ipv6\_allowed\_for\_dual\_stack](#input\_ipv6\_allowed\_for\_dual\_stack) | Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets | `bool` | `null` | no |
802803
| <a name="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn) | The ARN of KMS key to use by your Lambda Function | `string` | `null` | no |

‎main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ resource "aws_lambda_function" "this" {
138138
}
139139

140140
tags = merge(
141-
{ terraform-aws-modules = "lambda" },
141+
var.include_default_tag ? { terraform-aws-modules = "lambda" } : {},
142142
var.tags,
143143
var.function_tags
144144
)

‎variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ variable "tags" {
188188
default = {}
189189
}
190190

191+
variable "include_default_tag" {
192+
description = "Set to false to not include the default tag in the tags map."
193+
type = bool
194+
default = true
195+
}
196+
191197
variable "function_tags" {
192198
description = "A map of tags to assign only to the lambda function"
193199
type = map(string)

‎wrappers/main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ module "wrapper" {
6767
image_config_entry_point = try(each.value.image_config_entry_point, var.defaults.image_config_entry_point, [])
6868
image_config_working_directory = try(each.value.image_config_working_directory, var.defaults.image_config_working_directory, null)
6969
image_uri = try(each.value.image_uri, var.defaults.image_uri, null)
70+
include_default_tag = try(each.value.include_default_tag, var.defaults.include_default_tag, true)
7071
invoke_mode = try(each.value.invoke_mode, var.defaults.invoke_mode, null)
7172
ipv6_allowed_for_dual_stack = try(each.value.ipv6_allowed_for_dual_stack, var.defaults.ipv6_allowed_for_dual_stack, null)
7273
kms_key_arn = try(each.value.kms_key_arn, var.defaults.kms_key_arn, null)

0 commit comments

Comments
 (0)
Please sign in to comment.