diff --git a/README.md b/README.md
index 7d988ab..3df2b07 100644
--- a/README.md
+++ b/README.md
@@ -210,6 +210,7 @@ components:
| [forwarder\_rds\_enabled](#input\_forwarder\_rds\_enabled) | Flag to enable or disable Datadog RDS enhanced monitoring forwarder | `bool` | `false` | no |
| [forwarder\_rds\_filter\_pattern](#input\_forwarder\_rds\_filter\_pattern) | Filter pattern for Lambda forwarder RDS | `string` | `""` | no |
| [forwarder\_rds\_layers](#input\_forwarder\_rds\_layers) | List of Lambda Layer Version ARNs (maximum of 5) to attach to Datadog RDS enhanced monitoring lambda function | `list(string)` | `[]` | no |
+| [forwarder\_use\_cache\_bucket](#input\_forwarder\_use\_cache\_bucket) | Flag to enable or disable the cache bucket for lambda tags and failed events. See https://docs.datadoghq.com/logs/guide/forwarder/?tab=cloudformation#upgrade-an-older-version-to-31060. Recommended for forwarder versions 3.106 and higher. | `bool` | `true` | no |
| [forwarder\_vpc\_logs\_artifact\_url](#input\_forwarder\_vpc\_logs\_artifact\_url) | The URL for the code of the Datadog forwarder for VPC Logs. It can be a local file, url or git repo | `string` | `null` | no |
| [forwarder\_vpc\_logs\_enabled](#input\_forwarder\_vpc\_logs\_enabled) | Flag to enable or disable Datadog VPC flow log forwarder | `bool` | `false` | no |
| [forwarder\_vpc\_logs\_layers](#input\_forwarder\_vpc\_logs\_layers) | List of Lambda Layer Version ARNs (maximum of 5) to attach to Datadog VPC flow log forwarder lambda function | `list(string)` | `[]` | no |
@@ -220,6 +221,7 @@ components:
| [label\_order](#input\_label\_order) | The order in which the labels (ID elements) appear in the `id`.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. | `list(string)` | `null` | no |
| [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of ID elements (labels) as included in `id`,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs.
Default value: `lower`. | `string` | `null` | no |
| [labels\_as\_tags](#input\_labels\_as\_tags) | Set of labels (ID elements) to include as tags in the `tags` output.
Default is to include all labels.
Tags with empty values will not be included in the `tags` output.
Set to `[]` to suppress all generated tags.
**Notes:**
The value of the `name` tag, if included, will be the `id`, not the `name`.
Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be
changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` |
[| no | +| [lambda\_architectures](#input\_lambda\_architectures) | Instruction set architecture for the Datadog Lambda function. Valid values are ["x86\_64"] and ["arm64"]. Set to ["arm64"] when using Datadog Forwarder 5.x artifacts. | `list(string)` | `null` | no | | [lambda\_arn\_enabled](#input\_lambda\_arn\_enabled) | Enable adding the Lambda Arn to this account integration | `bool` | `true` | no | | [lambda\_policy\_source\_json](#input\_lambda\_policy\_source\_json) | Additional IAM policy document that can optionally be passed and merged with the created policy document | `string` | `""` | no | | [lambda\_reserved\_concurrent\_executions](#input\_lambda\_reserved\_concurrent\_executions) | Amount of reserved concurrent executions for the lambda function. A value of 0 disables Lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1 | `number` | `-1` | no | diff --git a/src/README.md b/src/README.md index 4952814..e88ae8b 100644 --- a/src/README.md +++ b/src/README.md @@ -159,6 +159,7 @@ components: | [forwarder\_rds\_enabled](#input\_forwarder\_rds\_enabled) | Flag to enable or disable Datadog RDS enhanced monitoring forwarder | `bool` | `false` | no | | [forwarder\_rds\_filter\_pattern](#input\_forwarder\_rds\_filter\_pattern) | Filter pattern for Lambda forwarder RDS | `string` | `""` | no | | [forwarder\_rds\_layers](#input\_forwarder\_rds\_layers) | List of Lambda Layer Version ARNs (maximum of 5) to attach to Datadog RDS enhanced monitoring lambda function | `list(string)` | `[]` | no | +| [forwarder\_use\_cache\_bucket](#input\_forwarder\_use\_cache\_bucket) | Flag to enable or disable the cache bucket for lambda tags and failed events. See https://docs.datadoghq.com/logs/guide/forwarder/?tab=cloudformation#upgrade-an-older-version-to-31060. Recommended for forwarder versions 3.106 and higher. | `bool` | `true` | no | | [forwarder\_vpc\_logs\_artifact\_url](#input\_forwarder\_vpc\_logs\_artifact\_url) | The URL for the code of the Datadog forwarder for VPC Logs. It can be a local file, url or git repo | `string` | `null` | no | | [forwarder\_vpc\_logs\_enabled](#input\_forwarder\_vpc\_logs\_enabled) | Flag to enable or disable Datadog VPC flow log forwarder | `bool` | `false` | no | | [forwarder\_vpc\_logs\_layers](#input\_forwarder\_vpc\_logs\_layers) | List of Lambda Layer Version ARNs (maximum of 5) to attach to Datadog VPC flow log forwarder lambda function | `list(string)` | `[]` | no | @@ -169,6 +170,7 @@ components: | [label\_order](#input\_label\_order) | The order in which the labels (ID elements) appear in the `id`.
"default"
]
[| no | +| [lambda\_architectures](#input\_lambda\_architectures) | Instruction set architecture for the Datadog Lambda function. Valid values are ["x86\_64"] and ["arm64"]. Set to ["arm64"] when using Datadog Forwarder 5.x artifacts. | `list(string)` | `null` | no | | [lambda\_arn\_enabled](#input\_lambda\_arn\_enabled) | Enable adding the Lambda Arn to this account integration | `bool` | `true` | no | | [lambda\_policy\_source\_json](#input\_lambda\_policy\_source\_json) | Additional IAM policy document that can optionally be passed and merged with the created policy document | `string` | `""` | no | | [lambda\_reserved\_concurrent\_executions](#input\_lambda\_reserved\_concurrent\_executions) | Amount of reserved concurrent executions for the lambda function. A value of 0 disables Lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1 | `number` | `-1` | no | diff --git a/src/main.tf b/src/main.tf index f0a9cfd..c1b831f 100644 --- a/src/main.tf +++ b/src/main.tf @@ -64,11 +64,13 @@ module "datadog_lambda_forwarder" { forwarder_rds_enabled = var.forwarder_rds_enabled forwarder_rds_filter_pattern = var.forwarder_rds_filter_pattern forwarder_rds_layers = var.forwarder_rds_layers + forwarder_use_cache_bucket = var.forwarder_use_cache_bucket forwarder_vpc_logs_artifact_url = var.forwarder_vpc_logs_artifact_url forwarder_vpc_logs_enabled = var.forwarder_vpc_logs_enabled forwarder_vpc_logs_layers = var.forwarder_vpc_logs_layers forwarder_vpclogs_filter_pattern = var.forwarder_vpclogs_filter_pattern kms_key_id = var.kms_key_id + lambda_architectures = var.lambda_architectures lambda_policy_source_json = var.lambda_policy_source_json lambda_reserved_concurrent_executions = var.lambda_reserved_concurrent_executions lambda_runtime = var.lambda_runtime diff --git a/src/variables.tf b/src/variables.tf index 05b4d16..add9475 100644 --- a/src/variables.tf +++ b/src/variables.tf @@ -28,6 +28,17 @@ variable "lambda_runtime" { default = "python3.11" } +variable "lambda_architectures" { + type = list(string) + description = "Instruction set architecture for the Datadog Lambda function. Valid values are [\"x86_64\"] and [\"arm64\"]. Set to [\"arm64\"] when using Datadog Forwarder 5.x artifacts." + default = null + + validation { + condition = var.lambda_architectures == null ? true : alltrue([for a in var.lambda_architectures : contains(["x86_64", "arm64"], a)]) + error_message = "lambda_architectures must be null or a list containing only \"x86_64\" and/or \"arm64\"." + } +} + variable "tracing_config_mode" { type = string description = "Can be either PassThrough or Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with 'sampled=1'. If Active, Lambda will respect any tracing header it receives from an upstream service" @@ -82,6 +93,12 @@ variable "forwarder_log_retention_days" { default = 14 } +variable "forwarder_use_cache_bucket" { + type = bool + description = "Flag to enable or disable the cache bucket for lambda tags and failed events. See https://docs.datadoghq.com/logs/guide/forwarder/?tab=cloudformation#upgrade-an-older-version-to-31060. Recommended for forwarder versions 3.106 and higher." + default = true +} + variable "kms_key_id" { type = string description = "Optional KMS key ID to encrypt Datadog Lambda function logs"
"default"
]