From 00f6b5b46ff57b302d0ec4ab4ced7f51712a1ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Taveira=20Ara=C3=BAjo?= Date: Fri, 7 Jun 2024 11:29:02 -0700 Subject: [PATCH] fix(logwriter): remove default prefix This behavior predates changes in the forwarder lambda which match on path under `AWSLogs/`. --- modules/logwriter/README.md | 2 +- modules/logwriter/variables.tf | 2 +- modules/stack/logwriter.tf | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/logwriter/README.md b/modules/logwriter/README.md index 7b93065..2d623bd 100644 --- a/modules/logwriter/README.md +++ b/modules/logwriter/README.md @@ -107,7 +107,7 @@ module "logwriter" { | [log\_group\_name\_prefixes](#input\_log\_group\_name\_prefixes) | Subscribe to CloudWatch log groups matching any of the provided prefixes.
To subscribe to all log groups use the wildcard operator *. | `list(string)` | `null` | no | | [name](#input\_name) | Name for resources. | `string` | n/a | yes | | [num\_workers](#input\_num\_workers) | Maximum number of concurrent workers when processing log groups. | `number` | `null` | no | -| [prefix](#input\_prefix) | Optional prefix to write log records to. | `string` | `"cloudwatchlogs/"` | no | +| [prefix](#input\_prefix) | Optional prefix to write log records to. | `string` | `""` | no | | [sam\_release\_version](#input\_sam\_release\_version) | Release version for SAM apps as defined on github.com/observeinc/aws-sam-apps. | `string` | `null` | no | | [verbosity](#input\_verbosity) | Logging verbosity for Lambda. Highest log verbosity is 9. | `number` | `null` | no | diff --git a/modules/logwriter/variables.tf b/modules/logwriter/variables.tf index 10367f2..5dedf4c 100644 --- a/modules/logwriter/variables.tf +++ b/modules/logwriter/variables.tf @@ -28,7 +28,7 @@ variable "prefix" { description = "Optional prefix to write log records to." type = string nullable = false - default = "cloudwatchlogs/" + default = "" } variable "buffering_interval" { diff --git a/modules/stack/logwriter.tf b/modules/stack/logwriter.tf index 0c2f5a0..ed3728c 100644 --- a/modules/stack/logwriter.tf +++ b/modules/stack/logwriter.tf @@ -4,7 +4,6 @@ module "logwriter" { name = "${var.name}-logwriter" bucket_arn = aws_s3_bucket.this.arn - prefix = "cloudwatchlogs/" log_group_name_patterns = var.logwriter.log_group_name_patterns log_group_name_prefixes = var.logwriter.log_group_name_prefixes