Skip to content

Commit 8183749

Browse files
author
Sohan
committed
add peratmiter group as a var
1 parent 7295372 commit 8183749

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

_example/redis-cluster/example.tf

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module "redis-cluster" {
5858
subnet_ids = module.subnets.public_subnet_id
5959
security_group_ids = [module.redis-sg.security_group_ids]
6060
availability_zones = ["eu-west-1a", "eu-west-1b"]
61+
parameter_group_name = "default.redis5.0.cluster.on"
6162
auto_minor_version_upgrade = true
6263
replicas_per_node_group = 2
6364
num_node_groups = 1

_example/redis/example.tf

+8-6
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ module "redis" {
4848
environment = "test"
4949
label_order = ["environment", "application", "name"]
5050

51-
replication_enabled = true
52-
engine = "redis"
53-
engine_version = "5.0.0"
54-
family = "redis5.0"
55-
port = 6379
56-
node_type = "cache.t2.micro"
51+
replication_enabled = true
52+
engine = "redis"
53+
engine_version = "5.0.0"
54+
family = "redis5.0"
55+
port = 6379
56+
node_type = "cache.t2.micro"
57+
parameter_group_name = "default.redis5.0"
58+
5759
subnet_ids = module.subnets.public_subnet_id
5860
security_group_ids = [module.redis-sg.security_group_ids]
5961
availability_zones = ["eu-west-1a", "eu-west-1b"]

main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ resource "aws_elasticache_replication_group" "default" {
3636
replication_group_description = module.labels.id
3737
engine_version = var.engine_version
3838
port = var.port
39-
parameter_group_name = "default.redis5.0"
39+
parameter_group_name = var.parameter_group_name
4040
node_type = var.node_type
4141
automatic_failover_enabled = var.automatic_failover_enabled
4242
subnet_group_name = join("", aws_elasticache_subnet_group.default.*.name)
@@ -68,7 +68,7 @@ resource "aws_elasticache_replication_group" "cluster" {
6868
replication_group_description = module.labels.id
6969
engine_version = var.engine_version
7070
port = var.port
71-
parameter_group_name = "default.redis5.0.cluster.on"
71+
parameter_group_name = var.parameter_group_name
7272
node_type = var.node_type
7373
automatic_failover_enabled = var.automatic_failover_enabled
7474
subnet_group_name = join("", aws_elasticache_subnet_group.default.*.name)

variables.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ variable "environment" {
1919
}
2020

2121
variable "label_order" {
22-
type = list
22+
type = list(any)
2323
default = []
2424
description = "Label order, e.g. `name`,`application`."
2525
}
2626

2727
variable "attributes" {
28-
type = list
28+
type = list(any)
2929
default = []
3030
description = "Additional attributes (e.g. `1`)."
3131
}
3232

3333
variable "tags" {
34-
type = map
34+
type = map(any)
3535
default = {}
3636
description = "Additional tags (e.g. map(`BusinessUnit`,`XYZ`)."
3737
}

0 commit comments

Comments
 (0)