Skip to content

Commit

Permalink
added descriptions to variables.tf and updated readme to use auto-gen…
Browse files Browse the repository at this point in the history
…erated tf-docs
  • Loading branch information
danifitz committed Oct 25, 2022
1 parent 6487f8d commit 9fdab86
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 18 deletions.
73 changes: 55 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,6 @@

A Terraform Module to pipe alerts from Lacework via AWS Eventbridge to an AWS S3 bucket with Lacework.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|----------|
| aws_profile | The AWS CLI profile to use to authenticate with AWS | String | none | Yes |
| aws_region | The AWS region to create the resources in | String | none | Yes |
| aws_s3_bucket_name | The name of the S3 bucket to be created | String | none | Yes |
| aws_eventbridge_event_bus_name | The name of the AWS EventBridge to be created | String | Lacework_Alerts_Event_Bus | No |
| aws_eventbridge_event_rule_name | The name of the AWS EventBridge rule to be created | String | Lacework_Alerts_Event_Rule | No |
| aws_sqs_queue_name | The name of the SQS queue to be created | String | Lacework_Alerts_SQS_Queue_Name | No |
| lacework_profile | The Lacework CLI profile to be used to authenticate with Lacework | String | default | No |
| lacework_eventbridge_alert_channel_name | The name of the Lacework alert channel to be created | String | Alerts to AWS S3 via EventBridge | No |


## Outputs

This module has no outputs

## What does this do?

Creates resources in AWS and Lacework to pipe alerts from Lacework via AWS Eventbridge to an AWS S3 bucket.
Expand All @@ -45,6 +27,61 @@ The terraform module will create the following in your AWS account

**NOTE: You still need to attach a Lacework [alert rule](https://docs.lacework.com/console/alert-rules) to the alert channel to route alerts to the channel.**

## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 3.0 |
| <a name="requirement_lacework"></a> [lacework](#requirement\_lacework) | ~> 0.20.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 3.75.2 |
| <a name="provider_lacework"></a> [lacework](#provider\_lacework) | 0.20.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_cloudwatch_event_bus.lacework_alerts_eventbridge_event_bus](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_bus) | resource |
| [aws_cloudwatch_event_bus_policy.lacework_event_bus_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_bus_policy) | resource |
| [aws_cloudwatch_event_rule.lacework_alerts_eventbridge_event_rule](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_rule) | resource |
| [aws_cloudwatch_event_target.sqs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target) | resource |
| [aws_iam_policy.lacework_alerts_lambda_execution_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
| [aws_iam_role.lacework_alerts_lambda_execution_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy_attachment.lambda-role-policy-attach](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_lambda_event_source_mapping.lacework-alerts-sqs-to-lambda](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_event_source_mapping) | resource |
| [aws_lambda_function.lacework_sqs_to_s3](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) | resource |
| [aws_s3_bucket.lacework_alerts_bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket_acl.example](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl) | resource |
| [aws_sqs_queue.lacework_alerts_queue](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | resource |
| [aws_sqs_queue_policy.lacework_alerts_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue_policy) | resource |
| [lacework_alert_channel_aws_cloudwatch.all_events](https://registry.terraform.io/providers/lacework/lacework/latest/docs/resources/alert_channel_aws_cloudwatch) | resource |
| [aws_iam_policy_document.lacework_event_bus_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_aws_eventbridge_event_bus_name"></a> [aws\_eventbridge\_event\_bus\_name](#input\_aws\_eventbridge\_event\_bus\_name) | The name of the AWS EventBridge to be created | `string` | `"Lacework_Alerts_Event_Bus"` | no |
| <a name="input_aws_eventbridge_event_rule_name"></a> [aws\_eventbridge\_event\_rule\_name](#input\_aws\_eventbridge\_event\_rule\_name) | The name of the AWS EventBridge rule to be created | `string` | `"Lacework_Alerts_Event_Rule"` | no |
| <a name="input_aws_profile"></a> [aws\_profile](#input\_aws\_profile) | The AWS CLI profile to use to authenticate with AWS | `string` | n/a | yes |
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | The AWS region to create the resources in | `string` | n/a | yes |
| <a name="input_aws_s3_bucket_name"></a> [aws\_s3\_bucket\_name](#input\_aws\_s3\_bucket\_name) | The name of the S3 bucket to be created | `string` | n/a | yes |
| <a name="input_aws_sqs_queue_name"></a> [aws\_sqs\_queue\_name](#input\_aws\_sqs\_queue\_name) | The name of the SQS queue to be created | `string` | `"Lacework_Alerts_SQS_Queue_Name"` | no |
| <a name="input_lacework_eventbridge_alert_channel_name"></a> [lacework\_eventbridge\_alert\_channel\_name](#input\_lacework\_eventbridge\_alert\_channel\_name) | The name of the Lacework alert channel to be created | `string` | `"Alerts to AWS S3 via EventBridge"` | no |
| <a name="input_lacework_profile"></a> [lacework\_profile](#input\_lacework\_profile) | The Lacework CLI profile to be used to authenticate with Lacework | `string` | `"default"` | no |

## Outputs

No outputs.

## Terraform install

### Prequisites
Expand Down
8 changes: 8 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,35 @@
###################################
variable "aws_profile" {
type = string
description = "The AWS CLI profile to use to authenticate with AWS"
}

variable "aws_region" {
type = string
description = "The AWS region to create the resources in"
}

variable "aws_eventbridge_event_bus_name" {
type = string
default = "Lacework_Alerts_Event_Bus"
description = "The name of the AWS EventBridge to be created"
}

variable "aws_eventbridge_event_rule_name" {
type = string
default = "Lacework_Alerts_Event_Rule"
description = "The name of the AWS EventBridge rule to be created"
}

variable "aws_sqs_queue_name" {
type = string
default = "Lacework_Alerts_SQS_Queue_Name"
description = "The name of the SQS queue to be created"
}

variable "aws_s3_bucket_name" {
type = string
description = "The name of the S3 bucket to be created"
}

###################################
Expand All @@ -34,10 +40,12 @@ variable "aws_s3_bucket_name" {
variable "lacework_profile" {
type = string
default = "default"
description = "The Lacework CLI profile to be used to authenticate with Lacework"
}

variable "lacework_eventbridge_alert_channel_name" {
type = string
default = "Alerts to AWS S3 via EventBridge"
description = "The name of the Lacework alert channel to be created"
}

0 comments on commit 9fdab86

Please sign in to comment.