Skip to content

Commit e62a3b7

Browse files
authored
feat: Add Log Anomaly Detection Support (#74)
1 parent bf575e0 commit e62a3b7

File tree

72 files changed

+502
-69
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+502
-69
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,23 @@ module "log_account_policy" {
254254
}
255255
```
256256

257+
### Log Anomaly Detector
258+
259+
```hcl
260+
module "log_anomaly_detector" {
261+
source = "terraform-aws-modules/cloudwatch/aws//modules/log-anomaly-detector"
262+
version = "~> 4.0"
263+
264+
detector_name = "anomaly-detector"
265+
log_group_arns = ["arn:aws:logs:eu-west-1:835367859852:log-group:my-log-group"]
266+
anomaly_visibility_time = 7
267+
enabled = true
268+
evaluation_frequency = "FIVE_MIN"
269+
filter_pattern = "%test%"
270+
kms_key_id = "arn:aws:kms:eu-west-1:835367859852:key/9051f3e7-17b8-4543-8070-50e22599966"
271+
}
272+
```
273+
257274
## Examples
258275

259276
- [Complete Cloudwatch log metric filter and alarm](https://github.com/terraform-aws-modules/terraform-aws-cloudwatch/tree/master/examples/complete-log-metric-filter-and-alarm)
@@ -267,6 +284,7 @@ module "log_account_policy" {
267284
- [Cloudwatch log subscription filter](https://github.com/terraform-aws-modules/terraform-aws-cloudwatch/tree/master/examples/log-subscription-filter)
268285
- [Cloudwatch log data protection policy](https://github.com/terraform-aws-modules/terraform-aws-cloudwatch/tree/master/examples/log-group-with-data-protection-policy)
269286
- [Cloudwatch Log Account Policy](https://github.com/terraform-aws-modules/terraform-aws-cloudwatch/tree/master/examples/log-account-policy)
287+
- [Cloudwatch Log Anomaly Detector](https://github.com/terraform-aws-modules/terraform-aws-cloudwatch/tree/master/examples/log-anomaly-detector)
270288

271289
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
272290
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/cis-alarms/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.58 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
2424

2525
## Providers
2626

examples/cis-alarms/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.58"
7+
version = ">= 5.81"
88
}
99
}
1010
}

examples/complete-log-metric-filter-and-alarm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.58 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
2424

2525
## Providers
2626

examples/complete-log-metric-filter-and-alarm/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.58"
7+
version = ">= 5.81"
88
}
99
}
1010
}

examples/composite-alarm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.58 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.81 |
2424

2525
## Providers
2626

examples/composite-alarm/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.58"
7+
version = ">= 5.81"
88
}
99
}
1010
}

examples/fixtures/aws_cloudwatch_log_group/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.58"
7+
version = ">= 5.81"
88
}
99

1010
random = {

examples/fixtures/aws_kms_key/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.58"
7+
version = ">= 5.81"
88
}
99

1010
random = {

examples/fixtures/aws_lambda_function/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.58"
7+
version = ">= 5.81"
88
}
99

1010
random = {

0 commit comments

Comments
 (0)