Skip to content

Commit 107be19

Browse files
Make default tag terraform-aws-modules lambda optional
1 parent de6ae34 commit 107be19

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ No modules.
773773
| <a name="input_create_unqualified_alias_async_event_config"></a> [create\_unqualified\_alias\_async\_event\_config](#input\_create\_unqualified\_alias\_async\_event\_config) | Whether to allow async event configuration on unqualified alias pointing to $LATEST version | `bool` | `true` | no |
774774
| <a name="input_create_unqualified_alias_lambda_function_url"></a> [create\_unqualified\_alias\_lambda\_function\_url](#input\_create\_unqualified\_alias\_lambda\_function\_url) | Whether to use unqualified alias pointing to $LATEST version in Lambda Function URL | `bool` | `true` | no |
775775
| <a name="input_dead_letter_target_arn"></a> [dead\_letter\_target\_arn](#input\_dead\_letter\_target\_arn) | The ARN of an SNS topic or SQS queue to notify when an invocation fails. | `string` | `null` | no |
776+
| <a name="input_default_tf_aws_modules_tag"></a> [default\_tf\_aws\_modules\_tag](#input\_default\_tf\_aws\_modules\_tag) | Set to false to not include the default tag for all AWS modules. | `bool` | `true` | no |
776777
| <a name="input_description"></a> [description](#input\_description) | Description of your Lambda Function (or Layer) | `string` | `""` | no |
777778
| <a name="input_destination_on_failure"></a> [destination\_on\_failure](#input\_destination\_on\_failure) | Amazon Resource Name (ARN) of the destination resource for failed asynchronous invocations | `string` | `null` | no |
778779
| <a name="input_destination_on_success"></a> [destination\_on\_success](#input\_destination\_on\_success) | Amazon Resource Name (ARN) of the destination resource for successful asynchronous invocations | `string` | `null` | no |

main.tf

Lines changed: 1 addition & 1 deletion
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.default_tf_aws_modules_tag ? { terraform-aws-modules = "lambda" } : {},
142142
var.tags,
143143
var.function_tags
144144
)

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ variable "tags" {
188188
default = {}
189189
}
190190

191+
variable "default_tf_aws_modules_tag" {
192+
description = "Set to false to not include the default tag for all AWS modules."
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)

0 commit comments

Comments
 (0)