Skip to content

Commit

Permalink
chore(docs): add usage section
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz-makandra committed Sep 4, 2024
1 parent 2a71afa commit 643d501
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Terraform AWS CloudTrail CIS Alerts

This module contains alert definitions to comply with the [CIS AWS Foundation Benchmark]([CIS AWS Foundations Benchmark - AWS Security Hub](https://docs.aws.amazon.com/securityhub/latest/userguide/cis-aws-foundations-benchmark.html).

## Usage

### Examples

```hcl
module "cis_alarms" {
source = "makandra/aws-cloudtrail-cis-alarms"
alarm_action_arns = module.sns_topic.topic_arn
log_group_name = "cloud-trail-logs"
}
```

Further examples can be found in the `examples` directory.

### Overriding Rules

You can add additional rules or overwrite existing rules by passing a map of rules via `rule_overrides` parameter. There is no deep merge. When adding an object with a key that exist in `rules.tf`, the whole rule is reset with the parameters set in `rule_overrides`.

```hcl
module "cis_alarms" {
source = "../../"
rule_overrides = {
FancyRule = {
pattern = "{$.errorCode = \"Fancy\"}"
description = "My fancy rule"
period = 300
}
}
}
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down

0 comments on commit 643d501

Please sign in to comment.