Commit e3e98ff0 authored by Igor Rodionov's avatar Igor Rodionov Committed by GitHub

Support Redis Parameters (#24)

* Paramatrise redis

* Update label version

* Update label version

* Update example

* Fix example
Signed-off-by: default avatarIgor Rodionov <goruha@gmail.com>

* Update variables.tf

* Update terraform.md

* Update README.md
parent 945d6701
......@@ -107,6 +107,7 @@ Available targets:
| name | Name | string | `redis` | no |
| namespace | Namespace | string | `global` | no |
| notification_topic_arn | Notification topic arn | string | `` | no |
| parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no |
| port | Redis port | string | `6379` | no |
| security_groups | AWS security group ids | list | `<list>` | no |
| stage | Stage | string | `default` | no |
......
......@@ -22,6 +22,7 @@
| name | Name | string | `redis` | no |
| namespace | Namespace | string | `global` | no |
| notification_topic_arn | Notification topic arn | string | `` | no |
| parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no |
| port | Redis port | string | `6379` | no |
| security_groups | AWS security group ids | list | `<list>` | no |
| stage | Stage | string | `default` | no |
......
......@@ -66,4 +66,11 @@ module "redis" {
alarm_cpu_threshold_percent = "75"
alarm_memory_threshold_bytes = "10000000"
at_rest_encryption_enabled = "true"
parameter = [
{
name = "notify-keyspace-events"
value = "lK"
},
]
}
# Define composite variables for resources
module "label" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.3.3"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.5.3"
enabled = "${var.enabled}"
namespace = "${var.namespace}"
name = "${var.name}"
......@@ -45,6 +45,7 @@ resource "aws_elasticache_parameter_group" "default" {
count = "${var.enabled == "true" ? 1 : 0}"
name = "${module.label.id}"
family = "${var.family}"
parameter = "${var.parameter}"
}
resource "aws_elasticache_replication_group" "default" {
......
......@@ -60,6 +60,12 @@ variable "family" {
description = "Redis family "
}
variable "parameter" {
type = "list"
default = []
description = "A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another"
}
variable "engine_version" {
default = "4.0.10"
description = "Redis engine version"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment