https://github.com/docspring/terraform-aws-logstruct
Terraform module that provides type-safe AWS CloudWatch metrics and subscription filters for LogStruct logs
https://github.com/docspring/terraform-aws-logstruct
Last synced: 4 months ago
JSON representation
Terraform module that provides type-safe AWS CloudWatch metrics and subscription filters for LogStruct logs
- Host: GitHub
- URL: https://github.com/docspring/terraform-aws-logstruct
- Owner: DocSpring
- License: mit
- Created: 2025-09-05T11:46:11.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-05T16:28:12.000Z (10 months ago)
- Last Synced: 2025-09-05T16:42:10.631Z (10 months ago)
- Language: HCL
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-aws-logstruct
Reusable Terraform modules for LogStruct on AWS.
Modules:
- `modules/metric-filter`: Creates an `aws_cloudwatch_log_metric_filter` from a LogStruct `source` and `event` using the LogStruct provider for validation and pattern generation.
- `modules/subscription-filter`: Creates an `aws_cloudwatch_log_subscription_filter` from a LogStruct `source` and `event`.
Root module
The root re-exports both submodules as optional modules. Enable one or both via booleans and pass the corresponding inputs:
```hcl
module "logstruct_aws" {
source = "DocSpring/logstruct/aws"
enable_metric_filter = true
metric_filter_name = "Email Delivered Count"
metric_log_group_name = var.log_group.docspring
metric_log_source = "mailer"
metric_log_event = "delivered"
metric_namespace = var.namespace.logs
enable_subscription_filter = false
}
```
Versioning
- Provider: The LogStruct provider is auto‑tagged and released from the LogStruct CI. Provider versions track the gem’s releases and are kept in sync automatically.
- Module: This module is updated much less frequently and is NOT auto‑tagged. We publish module tags manually when the module itself changes. You do not need to keep the module version in lock‑step with the provider/gem; pin the module version independently in your configuration.
Links:
- Provider documentation: https://registry.terraform.io/providers/DocSpring/logstruct/latest
- Module on the Registry: https://registry.terraform.io/modules/DocSpring/logstruct/aws