From 85ea6638460320b5671d353ec59b20ef6b62fead Mon Sep 17 00:00:00 2001 From: Andreas Engl Date: Thu, 8 Aug 2024 20:51:05 +0200 Subject: [PATCH] feat: add option to set cloudwatch_log_group_class --- README.md | 5 +++-- main.tf | 1 + variables.tf | 7 +++++++ versions.tf | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 85f9ba1..3d1ad57 100644 --- a/README.md +++ b/README.md @@ -128,14 +128,14 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.21 | +| [aws](#requirement\_aws) | >= 5.30 | | [random](#requirement\_random) | >= 3.6 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.21 | +| [aws](#provider\_aws) | >= 5.30 | | [random](#provider\_random) | >= 3.6 | ## Modules @@ -172,6 +172,7 @@ No modules. | [broker\_node\_security\_groups](#input\_broker\_node\_security\_groups) | A list of the security groups to associate with the elastic network interfaces to control who can communicate with the cluster | `list(string)` | `[]` | no | | [broker\_node\_storage\_info](#input\_broker\_node\_storage\_info) | A block that contains information about storage volumes attached to MSK broker nodes | `any` | `{}` | no | | [client\_authentication](#input\_client\_authentication) | Configuration block for specifying a client authentication | `any` | `{}` | no | +| [cloudwatch\_log\_group\_class](#input\_cloudwatch\_log\_group\_class) | Specifies the log class of the log group. Possible values are: STANDARD or INFREQUENT\_ACCESS. | `bool` | `null` | no | | [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | The ARN of the KMS Key to use when encrypting log data | `string` | `null` | no | | [cloudwatch\_log\_group\_name](#input\_cloudwatch\_log\_group\_name) | Name of the Cloudwatch Log Group to deliver logs to | `string` | `null` | no | | [cloudwatch\_log\_group\_retention\_in\_days](#input\_cloudwatch\_log\_group\_retention\_in\_days) | Specifies the number of days you want to retain log events in the log group | `number` | `0` | no | diff --git a/main.tf b/main.tf index 9726c31..244489b 100644 --- a/main.tf +++ b/main.tf @@ -291,6 +291,7 @@ resource "aws_cloudwatch_log_group" "this" { name = coalesce(var.cloudwatch_log_group_name, "/aws/msk/${var.name}") retention_in_days = var.cloudwatch_log_group_retention_in_days kms_key_id = var.cloudwatch_log_group_kms_key_id + log_group_class = var.cloudwatch_log_group_class tags = var.tags } diff --git a/variables.tf b/variables.tf index 7b2d128..eb4441d 100644 --- a/variables.tf +++ b/variables.tf @@ -98,6 +98,13 @@ variable "cloudwatch_logs_enabled" { default = false } +variable "cloudwatch_log_group_class" { + description = "Specifies the log class of the log group. Possible values are: STANDARD or INFREQUENT_ACCESS." + type = bool + default = null +} + + variable "firehose_logs_enabled" { description = "Indicates whether you want to enable or disable streaming broker logs to Kinesis Data Firehose" type = bool diff --git a/versions.tf b/versions.tf index beaaf5f..824adb6 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.21" + version = ">= 5.30" } random = { source = "hashicorp/random"