An open API service indexing awesome lists of open source software.

https://github.com/geekcell/terraform-aws-cloudwatch-log-group

Terraform module to provision an AWS Cloudwatch Log Group.
https://github.com/geekcell/terraform-aws-cloudwatch-log-group

audit aws cloudwatch logging terraform terraform-module

Last synced: about 2 months ago
JSON representation

Terraform module to provision an AWS Cloudwatch Log Group.

Awesome Lists containing this project

README

          

[![Geek Cell GmbH](https://raw.githubusercontent.com/geekcell/.github/main/geekcell-github-banner.png)](https://www.geekcell.io/)

### Code Quality
[![License](https://img.shields.io/github/license/geekcell/terraform-aws-cloudwatch-log-group)](https://github.com/geekcell/terraform-aws-cloudwatch-log-group/blob/master/LICENSE)
[![GitHub release (latest tag)](https://img.shields.io/github/v/release/geekcell/terraform-aws-cloudwatch-log-group?logo=github&sort=semver)](https://github.com/geekcell/terraform-aws-cloudwatch-log-group/releases)
[![Release](https://github.com/geekcell/terraform-aws-cloudwatch-log-group/actions/workflows/release.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-cloudwatch-log-group/actions/workflows/release.yaml)
[![Validate](https://github.com/geekcell/terraform-aws-cloudwatch-log-group/actions/workflows/validate.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-cloudwatch-log-group/actions/workflows/validate.yaml)
[![Lint](https://github.com/geekcell/terraform-aws-cloudwatch-log-group/actions/workflows/linter.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-cloudwatch-log-group/actions/workflows/linter.yaml)

### Security
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/general)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=INFRASTRUCTURE+SECURITY)

#### Cloud
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/cis_aws)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=CIS+AWS+V1.2)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/cis_aws_13)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=CIS+AWS+V1.3)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/cis_azure)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=CIS+AZURE+V1.1)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/cis_azure_13)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=CIS+AZURE+V1.3)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/cis_gcp)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=CIS+GCP+V1.1)

##### Container
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/cis_kubernetes_16)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=CIS+KUBERNETES+V1.6)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/cis_eks_11)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=CIS+EKS+V1.1)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/cis_gke_11)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=CIS+GKE+V1.1)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/cis_kubernetes)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=CIS+KUBERNETES+V1.5)

#### Data protection
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/soc2)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=SOC2)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/pci)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=PCI-DSS+V3.2)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/pci_dss_v321)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=PCI-DSS+V3.2.1)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/iso)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=ISO27001)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/nist)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=NIST-800-53)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/hipaa)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=HIPAA)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/geekcell/terraform-aws-cloudwatch-log-group/fedramp_moderate)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=geekcell%2Fterraform-aws-cloudwatch-log-group&benchmark=FEDRAMP+%28MODERATE%29)

# Terraform Cloudwatch Log Group

Terraform module which creates an AWS Cloudwatch Log group. The focus on this module lies within it's simplicity by
providing default values that should make sense for most use cases.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [enable\_customer\_managed\_kms](#input\_enable\_customer\_managed\_kms) | Whether to enable customer managed KMS encryption for the log group. | `bool` | `false` | no |
| [kms\_key\_id](#input\_kms\_key\_id) | The ARN of the KMS Key to use when encrypting log data. | `string` | `null` | no |
| [log\_streams](#input\_log\_streams) | A list of log streams to create within the log group. | `list(string)` | `[]` | no |
| [name](#input\_name) | The name of the log group. | `string` | n/a | yes |
| [retention\_in\_days](#input\_retention\_in\_days) | Specifies the number of days you want to retain log events in the specified log group. | `number` | `30` | no |
| [skip\_destroy](#input\_skip\_destroy) | Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state. | `bool` | `false` | no |
| [tags](#input\_tags) | Tags to add to the AWS Cloudwatch log group. | `map(any)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| [arn](#output\_arn) | The cloudwatch log group ARN |
| [customer\_managed\_key\_arn](#output\_customer\_managed\_key\_arn) | The ARN of the customer KMS key used to encrypt log data if enabled. |
| [name](#output\_name) | The cloudwatch log group name |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 4.36 |

## Resources

- resource.aws_cloudwatch_log_group.main (main.tf#7)
- resource.aws_cloudwatch_log_stream.main (main.tf#17)
- data source.aws_caller_identity.current (data.tf#1)
- data source.aws_iam_policy_document.main (data.tf#5)
- data source.aws_region.current (data.tf#3)

# Examples
### Full
```hcl
module "example" {
source = "../../"

name = "example"
}
```