You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 16, 2025. It is now read-only.
feat(lambda): add option to define explicit lambda tags (#3934)
Introduced a new variable, lambda_tags, to both the main and submodule.
This variable will include any additional lambda function-specific tags,
enhancing the governance part of resources.
Co-authored-by: Niek Palm <[email protected]>
error_message="`state_event_rule_ami_housekeeper` value is not valid, valid values are: `ENABLED`, `DISABLED`, `ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS`."
193
193
}
194
194
}
195
+
196
+
variable"lambda_tags" {
197
+
description="Map of tags that will be added to all the lambda function resources. Note these are additional tags to the default tags."
Copy file name to clipboardExpand all lines: modules/lambda/variables.tf
+5-3
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,18 @@ variable "lambda" {
2
2
description=<<-EOF
3
3
Configuration for the lambda function.
4
4
5
-
'aws_partition': Partition for the base arn if not 'aws'
5
+
`aws_partition`: Partition for the base arn if not 'aws'
6
6
`architecture`: AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86_64' functions.
7
7
`environment_variables`: Environment variables for the lambda.
8
8
`handler`: The entrypoint for the lambda.
9
9
`principals`: Add extra principals to the role created for execution of the lambda, e.g. for local testing.
10
+
`lambda_tags`: Map of tags that will be added to created resources. By default resources will be tagged with name and environment.
10
11
`log_level`: Logging level for lambda logging. Valid values are 'silly', 'trace', 'debug', 'info', 'warn', 'error', 'fatal'.
11
12
`logging_kms_key_id`: Specifies the kms key id to encrypt the logs with
12
13
`logging_retention_in_days`: Specifies the number of days you want to retain log events for the lambda log group. Possible values are: 0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
13
14
`memory_size`: Memory size linit in MB of the lambda.
14
15
`metrics_namespace`: Namespace for the metrics emitted by the lambda.
15
-
'name': The name of the lambda function.
16
+
`name`: The name of the lambda function.
16
17
`prefix`: The prefix used for naming resources.
17
18
`role_path`: The path that will be added to the role, if not set the environment name will be used.
18
19
`role_permissions_boundary`: Permissions boundary that will be added to the created role for the lambda.
@@ -22,7 +23,7 @@ variable "lambda" {
22
23
`s3_object_version`: S3 object version for syncer lambda function. Useful if S3 versioning is enabled on source bucket.
23
24
`security_group_ids`: List of security group IDs associated with the Lambda function.
24
25
`subnet_ids`: List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc_id`.
25
-
'tags': Map of tags that will be added to created resources. By default resources will be tagged with name and environment.
26
+
`tags`: Map of tags that will be added to created resources. By default resources will be tagged with name and environment.
26
27
`timeout`: Time out of the lambda in seconds.
27
28
`tracing_config`: Configuration for lambda tracing.
Copy file name to clipboardExpand all lines: modules/termination-watcher/variables.tf
+5-3
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,12 @@ variable "config" {
2
2
description=<<-EOF
3
3
Configuration for the spot termination watcher lambda function.
4
4
5
-
'aws_partition': Partition for the base arn if not 'aws'
5
+
`aws_partition`: Partition for the base arn if not 'aws'
6
6
`architecture`: AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86_64' functions.
7
7
`environment_variables`: Environment variables for the lambda.
8
-
'enable_metric': Enable metric for the lambda. If `spot_warning` is set to true, the lambda will emit a metric when it detects a spot termination warning.
8
+
`enable_metric`: Enable metric for the lambda. If `spot_warning` is set to true, the lambda will emit a metric when it detects a spot termination warning.
9
9
`lambda_principals`: Add extra principals to the role created for execution of the lambda, e.g. for local testing.
10
+
`lambda_tags`: Map of tags that will be added to created resources. By default resources will be tagged with name and environment.
10
11
`log_level`: Logging level for lambda logging. Valid values are 'silly', 'trace', 'debug', 'info', 'warn', 'error', 'fatal'.
11
12
`logging_kms_key_id`: Specifies the kms key id to encrypt the logs with
12
13
`logging_retention_in_days`: Specifies the number of days you want to retain log events for the lambda log group. Possible values are: 0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
@@ -22,7 +23,7 @@ variable "config" {
22
23
`security_group_ids`: List of security group IDs associated with the Lambda function.
23
24
`subnet_ids`: List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc_id`.
24
25
`tag_filters`: Map of tags that will be used to filter the resources to be tracked. Only for which all tags are present and starting with the same value as the value in the map will be tracked.
25
-
'tags': Map of tags that will be added to created resources. By default resources will be tagged with name and environment.
26
+
`tags`: Map of tags that will be added to created resources. By default resources will be tagged with name and environment.
26
27
`timeout`: Time out of the lambda in seconds.
27
28
`tracing_config`: Configuration for lambda tracing.
0 commit comments