Skip to content

Commit 3051bcc

Browse files
committed
feat: update readme.yaml
1 parent dce80c6 commit 3051bcc

File tree

3 files changed

+87
-53
lines changed

3 files changed

+87
-53
lines changed

README.yaml

Lines changed: 85 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -44,66 +44,106 @@ usage : |-
4444
### Redis
4545
```hcl
4646
module "redis" {
47-
source = "clouddrove/elasticache/aws
48-
version = "1.3.0"
49-
name = "redis"
50-
environment = "test"
51-
label_order = ["environment", "name"]
52-
engine = "redis"
53-
engine_version = "5.0.0"
54-
family = "redis5.0"
55-
port = 6379
56-
node_type = "cache.t2.micro"
57-
subnet_ids = ["subnet-xxxxxxx","subnet-xxxxxxx","subnet-xxxxxxx"]
58-
security_group_ids = ["sg-xxxxxxxxx"]
59-
availability_zones = ["eu-west-1a","eu-west-1b" ]
60-
auto_minor_version_upgrade = true
61-
num_cache_clusters = 2
62-
}
47+
source = "clouddrove/elasticache/aws
48+
version = "1.3.0"
49+
50+
name = "redis"
51+
environment = "test"
52+
label_order = ["name", "environment"]
53+
54+
vpc_id = module.vpc.vpc_id
55+
allowed_ip = [module.vpc.vpc_cidr_block]
56+
allowed_ports = [6379]
57+
58+
cluster_replication_enabled = true
59+
replication_enabled = true
60+
engine = "redis"
61+
engine_version = "7.0"
62+
parameter_group_name = "default.redis7"
63+
port = 6379
64+
node_type = "cache.t2.micro"
65+
subnet_ids = module.subnets.public_subnet_id
66+
availability_zones = [""]
67+
automatic_failover_enabled = false
68+
multi_az_enabled = false
69+
num_cache_clusters = 1
70+
replicas_per_node_group = 1
71+
retention_in_days = 0
72+
snapshot_retention_limit = 7
73+
74+
log_delivery_configuration = [
75+
{
76+
destination_type = "cloudwatch-logs"
77+
log_format = "json"
78+
log_type = "slow-log"
79+
},
80+
{
81+
destination_type = "cloudwatch-logs"
82+
log_format = "json"
83+
log_type = "engine-log"
84+
}
85+
]
86+
extra_tags = {
87+
Application = "CloudDrove"
88+
}
6389
6490
```
6591
### Redis Cluster
6692
```hcl
6793
module "redis-cluster" {
68-
source = "clouddrove/elasticache/aws
69-
version = "1.3.0"
70-
name = "cluster"
71-
environment = "test"
72-
label_order = ["environment","name"]
94+
source = "clouddrove/elasticache/aws
95+
version = "1.3.0"
96+
97+
name = "redis-cluster"
98+
environment = "test"
99+
label_order = ["environment", "name"]
100+
101+
vpc_id = module.vpc.vpc_id
102+
allowed_ip = [module.vpc.vpc_cidr_block]
103+
allowed_ports = [6379]
104+
73105
cluster_replication_enabled = true
74106
engine = "redis"
75-
engine_version = "5.0.0"
76-
family = "redis5.0"
107+
engine_version = "7.0"
108+
parameter_group_name = "default.redis7.cluster.on"
77109
port = 6379
78110
node_type = "cache.t2.micro"
79111
subnet_ids = module.subnets.public_subnet_id
80-
security_group_ids = [module.redis-sg.security_group_ids]
81-
availability_zones = ["eu-west-1a","eu-west-1b" ]
82-
auto_minor_version_upgrade = true
112+
availability_zones = ["eu-west-1a", "eu-west-1b"]
83113
replicas_per_node_group = 2
84-
num_node_groups = 1
114+
num_cache_nodes = 1
115+
snapshot_retention_limit = 7
85116
automatic_failover_enabled = true
86-
}
117+
extra_tags = {
118+
Application = "CloudDrove"
119+
}
87120
```
88121
### Memcache
89122
```hcl
90123
module "memcached" {
91-
source = "clouddrove/elasticache/aws
92-
version = "1.3.0"
93-
name = "memcached"
94-
environment = "test"
95-
label_order = ["environment", "name"]
96-
cluster_enabled = true
97-
engine = "memcached"
98-
engine_version = "1.5.10"
99-
family = "memcached1.5"
100-
parameter_group_name = "default.memcached1.5"
101-
az_mode = "cross-az"
102-
port = 11211
103-
node_type = "cache.t2.micro"
104-
num_cache_nodes = 2
105-
subnet_ids = ["subnet-xxxxxxx","subnet-xxxxxxx","subnet-xxxxxxx"]
106-
security_group_ids = ["sg-xxxxxxxxx"]
107-
availability_zones = ["eu-west-1a","eu-west-1b" ]
124+
source = "clouddrove/elasticache/aws
125+
version = "1.3.0"
126+
127+
name = "memcached"
128+
environment = "test"
129+
label_order = ["name", "environment"]
130+
131+
vpc_id = module.vpc.vpc_id
132+
allowed_ip = [module.vpc.vpc_cidr_block]
133+
allowed_ports = [11211]
134+
135+
cluster_enabled = true
136+
engine = "memcached"
137+
engine_version = "1.6.17"
138+
family = "memcached1.5"
139+
parameter_group_name = ""
140+
az_mode = "cross-az"
141+
port = 11211
142+
node_type = "cache.t2.micro"
143+
num_cache_nodes = 2
144+
subnet_ids = module.subnets.public_subnet_id
145+
availability_zones = ["eu-west-1a", "eu-west-1b"]
146+
extra_tags = {
147+
Application = "CloudDrove"
108148
}
109149
```

_example/redis-cluster/example.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ module "redis-cluster" {
5656
allowed_ip = [module.vpc.vpc_cidr_block]
5757
allowed_ports = [6379]
5858

59-
####----------------------------------------------------------------------------------
60-
## will create ROUTE-53 for redis which will add the dns of the cluster.
61-
####----------------------------------------------------------------------------------
6259
cluster_replication_enabled = true
6360
engine = "redis"
6461
engine_version = "7.0"

variables.tf

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,7 @@ variable "sg_description" {
382382
description = "The security group description."
383383
}
384384

385-
########route53##################
386-
385+
##---------------------route53------------------------
387386
variable "route53_record_enabled" {
388387
type = bool
389388
default = true
@@ -413,9 +412,7 @@ variable "route53_zone_id" {
413412
description = "Zone ID."
414413
}
415414

416-
###-----------------------------------------------------------------------
417-
###-------variable of the ssm_parameter
418-
###--------------------------------------------------------------------------
415+
###------------------------------- ssm_parameter----------------------------
419416

420417
variable "ssm_parameter_enabled" {
421418
type = bool

0 commit comments

Comments
 (0)