diff --git a/.github/renovate.json b/.github/renovate.json
index ae4f0aa..a780298 100644
--- a/.github/renovate.json
+++ b/.github/renovate.json
@@ -4,9 +4,9 @@
":preserveSemverRanges"
],
"labels": ["auto-update"],
+ "dependencyDashboardAutoclose": true,
"enabledManagers": ["terraform"],
"terraform": {
"ignorePaths": ["**/context.tf", "examples/**"]
}
}
-
diff --git a/README.md b/README.md
index d5ee76b..5cc7c21 100644
--- a/README.md
+++ b/README.md
@@ -214,13 +214,13 @@ Available targets:
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.14.0 |
-| [aws](#requirement\_aws) | >= 3.26 |
+| [aws](#requirement\_aws) | >= 4.18 |
## Providers
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 3.26 |
+| [aws](#provider\_aws) | >= 4.18 |
## Modules
@@ -285,6 +285,7 @@ Available targets:
| [label\_order](#input\_label\_order) | The order in which the labels (ID elements) appear in the `id`.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. | `list(string)` | `null` | no |
| [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of ID elements (labels) as included in `id`,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs.
Default value: `lower`. | `string` | `null` | no |
| [labels\_as\_tags](#input\_labels\_as\_tags) | Set of labels (ID elements) to include as tags in the `tags` output.
Default is to include all labels.
Tags with empty values will not be included in the `tags` output.
Set to `[]` to suppress all generated tags.
**Notes:**
The value of the `name` tag, if included, will be the `id`, not the `name`.
Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be
changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` |
[
"default"
]
| no |
+| [log\_delivery\_configuration](#input\_log\_delivery\_configuration) | The log\_delivery\_configuration block allows the streaming of Redis SLOWLOG or Redis Engine Log to CloudWatch Logs or Kinesis Data Firehose. Max of 2 blocks. | `list(map(any))` | `[]` | no |
| [maintenance\_window](#input\_maintenance\_window) | Maintenance window | `string` | `"wed:03:00-wed:04:00"` | no |
| [multi\_az\_enabled](#input\_multi\_az\_enabled) | Multi AZ (Automatic Failover must also be enabled. If Cluster Mode is enabled, Multi AZ is on by default, and this setting is ignored) | `bool` | `false` | no |
| [name](#input\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a `tag`.
The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
diff --git a/docs/terraform.md b/docs/terraform.md
index a699613..4d468cd 100644
--- a/docs/terraform.md
+++ b/docs/terraform.md
@@ -4,13 +4,13 @@
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.14.0 |
-| [aws](#requirement\_aws) | >= 3.26 |
+| [aws](#requirement\_aws) | >= 4.18 |
## Providers
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 3.26 |
+| [aws](#provider\_aws) | >= 4.18 |
## Modules
@@ -75,6 +75,7 @@
| [label\_order](#input\_label\_order) | The order in which the labels (ID elements) appear in the `id`.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. | `list(string)` | `null` | no |
| [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of ID elements (labels) as included in `id`,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs.
Default value: `lower`. | `string` | `null` | no |
| [labels\_as\_tags](#input\_labels\_as\_tags) | Set of labels (ID elements) to include as tags in the `tags` output.
Default is to include all labels.
Tags with empty values will not be included in the `tags` output.
Set to `[]` to suppress all generated tags.
**Notes:**
The value of the `name` tag, if included, will be the `id`, not the `name`.
Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be
changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` | [
"default"
]
| no |
+| [log\_delivery\_configuration](#input\_log\_delivery\_configuration) | The log\_delivery\_configuration block allows the streaming of Redis SLOWLOG or Redis Engine Log to CloudWatch Logs or Kinesis Data Firehose. Max of 2 blocks. | `list(map(any))` | `[]` | no |
| [maintenance\_window](#input\_maintenance\_window) | Maintenance window | `string` | `"wed:03:00-wed:04:00"` | no |
| [multi\_az\_enabled](#input\_multi\_az\_enabled) | Multi AZ (Automatic Failover must also be enabled. If Cluster Mode is enabled, Multi AZ is on by default, and this setting is ignored) | `bool` | `false` | no |
| [name](#input\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a `tag`.
The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
diff --git a/examples/complete/main.tf b/examples/complete/main.tf
index 3ce0336..5f62a7d 100644
--- a/examples/complete/main.tf
+++ b/examples/complete/main.tf
@@ -34,6 +34,13 @@ resource "aws_route53_zone" "private" {
}
}
+module "cloudwatch_logs" {
+ source = "cloudposse/cloudwatch-logs/aws"
+ version = "0.6.5"
+
+ context = module.this.context
+}
+
module "redis" {
source = "../../"
@@ -65,5 +72,14 @@ module "redis" {
security_group_delete_timeout = "5m"
+ log_delivery_configuration = [
+ {
+ destination = module.cloudwatch_logs.log_group_name
+ destination_type = "cloudwatch-logs"
+ log_format = "json"
+ log_type = "engine-log"
+ }
+ ]
+
context = module.this.context
}
diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf
index 971ae24..6b5f390 100644
--- a/examples/complete/versions.tf
+++ b/examples/complete/versions.tf
@@ -1,14 +1,10 @@
terraform {
- required_version = ">= 0.13.0"
+ required_version = ">= 0.14.0"
required_providers {
aws = {
source = "hashicorp/aws"
- version = ">= 2.0"
- }
- null = {
- source = "hashicorp/null"
- version = ">= 2.0"
+ version = ">= 4.18"
}
}
}
diff --git a/main.tf b/main.tf
index 28ee895..6dd1b1f 100644
--- a/main.tf
+++ b/main.tf
@@ -102,7 +102,6 @@ resource "aws_elasticache_parameter_group" "default" {
}
}
-
tags = module.this.tags
# Ignore changes to the description since it will try to recreate the resource
@@ -144,6 +143,17 @@ resource "aws_elasticache_replication_group" "default" {
final_snapshot_identifier = var.final_snapshot_identifier
apply_immediately = var.apply_immediately
+ dynamic "log_delivery_configuration" {
+ for_each = var.log_delivery_configuration
+
+ content {
+ destination = lookup(log_delivery_configuration.value, "destination", null)
+ destination_type = lookup(log_delivery_configuration.value, "destination_type", null)
+ log_format = lookup(log_delivery_configuration.value, "log_format", null)
+ log_type = lookup(log_delivery_configuration.value, "log_type", null)
+ }
+ }
+
tags = module.this.tags
num_node_groups = var.cluster_mode_enabled ? var.cluster_mode_num_node_groups : null
diff --git a/variables.tf b/variables.tf
index f5ae0ed..54b957a 100644
--- a/variables.tf
+++ b/variables.tf
@@ -1,5 +1,3 @@
-
-
variable "vpc_id" {
type = string
description = "VPC ID"
@@ -225,4 +223,10 @@ variable "parameter_group_description" {
type = string
default = null
description = "Managed by Terraform"
-}
\ No newline at end of file
+}
+
+variable "log_delivery_configuration" {
+ type = list(map(any))
+ default = []
+ description = "The log_delivery_configuration block allows the streaming of Redis SLOWLOG or Redis Engine Log to CloudWatch Logs or Kinesis Data Firehose. Max of 2 blocks."
+}
diff --git a/versions.tf b/versions.tf
index 17eaf80..6b5f390 100644
--- a/versions.tf
+++ b/versions.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = ">= 3.26"
+ version = ">= 4.18"
}
}
}