Skip to content

Commit 132ae69

Browse files
committed
update README.md
1 parent 153fd52 commit 132ae69

File tree

1 file changed

+132
-55
lines changed

1 file changed

+132
-55
lines changed

README.md

+132-55
Original file line numberDiff line numberDiff line change
@@ -78,67 +78,107 @@ Here are some examples of how you can use this module in your inventory structur
7878
### Redis
7979
```hcl
8080
module "redis" {
81-
source = "clouddrove/elasticache/aws
82-
version = "1.3.0"
83-
name = "redis"
84-
environment = "test"
85-
label_order = ["environment", "name"]
86-
engine = "redis"
87-
engine_version = "5.0.0"
88-
family = "redis5.0"
89-
port = 6379
90-
node_type = "cache.t2.micro"
91-
subnet_ids = ["subnet-xxxxxxx","subnet-xxxxxxx","subnet-xxxxxxx"]
92-
security_group_ids = ["sg-xxxxxxxxx"]
93-
availability_zones = ["eu-west-1a","eu-west-1b" ]
94-
auto_minor_version_upgrade = true
95-
num_cache_clusters = 2
96-
}
81+
source = "clouddrove/elasticache/aws
82+
version = "1.3.0"
83+
84+
name = "redis"
85+
environment = "test"
86+
label_order = ["name", "environment"]
87+
88+
vpc_id = module.vpc.vpc_id
89+
allowed_ip = [module.vpc.vpc_cidr_block]
90+
allowed_ports = [6379]
91+
92+
cluster_replication_enabled = true
93+
replication_enabled = true
94+
engine = "redis"
95+
engine_version = "7.0"
96+
parameter_group_name = "default.redis7"
97+
port = 6379
98+
node_type = "cache.t2.micro"
99+
subnet_ids = module.subnets.public_subnet_id
100+
availability_zones = [""]
101+
automatic_failover_enabled = false
102+
multi_az_enabled = false
103+
num_cache_clusters = 1
104+
replicas_per_node_group = 1
105+
retention_in_days = 0
106+
snapshot_retention_limit = 7
107+
108+
log_delivery_configuration = [
109+
{
110+
destination_type = "cloudwatch-logs"
111+
log_format = "json"
112+
log_type = "slow-log"
113+
},
114+
{
115+
destination_type = "cloudwatch-logs"
116+
log_format = "json"
117+
log_type = "engine-log"
118+
}
119+
]
120+
extra_tags = {
121+
Application = "CloudDrove"
122+
}
97123
98124
```
99125
### Redis Cluster
100126
```hcl
101127
module "redis-cluster" {
102-
source = "clouddrove/elasticache/aws
103-
version = "1.3.0"
104-
name = "cluster"
105-
environment = "test"
106-
label_order = ["environment","name"]
128+
source = "clouddrove/elasticache/aws
129+
version = "1.3.0"
130+
131+
name = "redis-cluster"
132+
environment = "test"
133+
label_order = ["environment", "name"]
134+
135+
vpc_id = module.vpc.vpc_id
136+
allowed_ip = [module.vpc.vpc_cidr_block]
137+
allowed_ports = [6379]
138+
107139
cluster_replication_enabled = true
108140
engine = "redis"
109-
engine_version = "5.0.0"
110-
family = "redis5.0"
141+
engine_version = "7.0"
142+
parameter_group_name = "default.redis7.cluster.on"
111143
port = 6379
112144
node_type = "cache.t2.micro"
113145
subnet_ids = module.subnets.public_subnet_id
114-
security_group_ids = [module.redis-sg.security_group_ids]
115-
availability_zones = ["eu-west-1a","eu-west-1b" ]
116-
auto_minor_version_upgrade = true
146+
availability_zones = ["eu-west-1a", "eu-west-1b"]
117147
replicas_per_node_group = 2
118-
num_node_groups = 1
148+
num_cache_nodes = 1
149+
snapshot_retention_limit = 7
119150
automatic_failover_enabled = true
120-
}
151+
extra_tags = {
152+
Application = "CloudDrove"
153+
}
121154
```
122155
### Memcache
123156
```hcl
124157
module "memcached" {
125-
source = "clouddrove/elasticache/aws
126-
version = "1.3.0"
127-
name = "memcached"
128-
environment = "test"
129-
label_order = ["environment", "name"]
130-
cluster_enabled = true
131-
engine = "memcached"
132-
engine_version = "1.5.10"
133-
family = "memcached1.5"
134-
parameter_group_name = "default.memcached1.5"
135-
az_mode = "cross-az"
136-
port = 11211
137-
node_type = "cache.t2.micro"
138-
num_cache_nodes = 2
139-
subnet_ids = ["subnet-xxxxxxx","subnet-xxxxxxx","subnet-xxxxxxx"]
140-
security_group_ids = ["sg-xxxxxxxxx"]
141-
availability_zones = ["eu-west-1a","eu-west-1b" ]
158+
source = "clouddrove/elasticache/aws
159+
version = "1.3.0"
160+
161+
name = "memcached"
162+
environment = "test"
163+
label_order = ["name", "environment"]
164+
165+
vpc_id = module.vpc.vpc_id
166+
allowed_ip = [module.vpc.vpc_cidr_block]
167+
allowed_ports = [11211]
168+
169+
cluster_enabled = true
170+
engine = "memcached"
171+
engine_version = "1.6.17"
172+
family = "memcached1.5"
173+
parameter_group_name = ""
174+
az_mode = "cross-az"
175+
port = 11211
176+
node_type = "cache.t2.micro"
177+
num_cache_nodes = 2
178+
subnet_ids = module.subnets.public_subnet_id
179+
availability_zones = ["eu-west-1a", "eu-west-1b"]
180+
extra_tags = {
181+
Application = "CloudDrove"
142182
}
143183
```
144184

@@ -151,61 +191,98 @@ Here are some examples of how you can use this module in your inventory structur
151191

152192
| Name | Description | Type | Default | Required |
153193
|------|-------------|------|---------|:--------:|
194+
| alias | The display name of the alias. The name must start with the word `alias` followed by a forward slash. | `string` | `"alias/redis"` | no |
195+
| allowed\_ip | List of allowed ip. | `list(any)` | `[]` | no |
196+
| allowed\_ports | List of allowed ingress ports | `list(any)` | `[]` | no |
154197
| apply\_immediately | Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is false. | `bool` | `false` | no |
155198
| at\_rest\_encryption\_enabled | Enable encryption at rest. | `bool` | `true` | no |
156199
| attributes | Additional attributes (e.g. `1`). | `list(any)` | `[]` | no |
157-
| auth\_token | The password used to access a password protected server. Can be specified only if transit\_encryption\_enabled = true. | `string` | `"gihweisdjhewiuei"` | no |
200+
| auth\_token | The password used to access a password protected server. Can be specified only if transit\_encryption\_enabled = true. | `string` | `null` | no |
158201
| auto\_minor\_version\_upgrade | Specifies whether a minor engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Defaults to true. | `bool` | `true` | no |
159-
| automatic\_failover\_enabled | Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If true, Multi-AZ is enabled for this replication group. If false, Multi-AZ is disabled for this replication group. Must be enabled for Redis (cluster mode enabled) replication groups. Defaults to false. | `bool` | `false` | no |
202+
| automatic\_failover\_enabled | Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If true, Multi-AZ is enabled for this replication group. If false, Multi-AZ is disabled for this replication group. Must be enabled for Redis (cluster mode enabled) replication groups. Defaults to false. | `bool` | `true` | no |
160203
| availability\_zones | A list of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is not important. | `list(string)` | n/a | yes |
161204
| az\_mode | (Memcached only) Specifies whether the nodes in this Memcached node group are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region. Valid values for this parameter are single-az or cross-az, default is single-az. If you want to choose cross-az, num\_cache\_nodes must be greater than 1. | `string` | `"single-az"` | no |
162205
| cluster\_enabled | (Memcache only) Enabled or disabled cluster. | `bool` | `false` | no |
163206
| cluster\_replication\_enabled | (Redis only) Enabled or disabled replication\_group for redis cluster. | `bool` | `false` | no |
164-
| description | Description for the cache subnet group. Defaults to `Managed by Terraform`. | `string` | `"Managed by Terraform"` | no |
207+
| customer\_master\_key\_spec | Specifies whether the key contains a symmetric key or an asymmetric key pair and the encryption algorithms or signing algorithms that the key supports. Valid values: SYMMETRIC\_DEFAULT, RSA\_2048, RSA\_3072, RSA\_4096, ECC\_NIST\_P256, ECC\_NIST\_P384, ECC\_NIST\_P521, or ECC\_SECG\_P256K1. Defaults to SYMMETRIC\_DEFAULT. | `string` | `"SYMMETRIC_DEFAULT"` | no |
208+
| deletion\_window\_in\_days | Duration in days after which the key is deleted after destruction of the resource. | `number` | `7` | no |
209+
| dns\_record\_name | The name of the record. | `string` | `""` | no |
210+
| egress\_rule | Enable to create egress rule | `bool` | `true` | no |
165211
| enable | Enable or disable of elasticache | `bool` | `true` | no |
212+
| enable\_key\_rotation | Specifies whether key rotation is enabled. | `string` | `true` | no |
213+
| enable\_security\_group | Enable default Security Group with only Egress traffic allowed. | `bool` | `true` | no |
166214
| engine | The name of the cache engine to be used for the clusters in this replication group. e.g. redis. | `string` | `""` | no |
167215
| engine\_version | The version number of the cache engine to be used for the cache clusters in this replication group. | `string` | `""` | no |
168216
| environment | Environment (e.g. `prod`, `dev`, `staging`). | `string` | `""` | no |
217+
| existing\_sg\_id | Provide existing security group id for updating existing rule | `string` | `null` | no |
169218
| extra\_tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`). | `map(string)` | `{}` | no |
170219
| family | (Required) The family of the ElastiCache parameter group. | `string` | `""` | no |
220+
| is\_enabled | Specifies whether the key is enabled. | `bool` | `true` | no |
221+
| is\_external | enable to udated existing security Group | `bool` | `false` | no |
222+
| key\_usage | Specifies the intended use of the key. Defaults to ENCRYPT\_DECRYPT, and only symmetric encryption and decryption are supported. | `string` | `"ENCRYPT_DECRYPT"` | no |
223+
| kms\_description | The description of the key as viewed in AWS console. | `string` | `"Parameter Store KMS master key"` | no |
224+
| kms\_key\_enabled | Specifies whether the kms is enabled or disabled. | `bool` | `true` | no |
171225
| kms\_key\_id | The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if at\_rest\_encryption\_enabled = true. | `string` | `""` | no |
226+
| kms\_multi\_region | Indicates whether the KMS key is a multi-Region (true) or regional (false) key. | `bool` | `false` | no |
172227
| label\_order | Label order, e.g. `name`,`application`. | `list(any)` | `[]` | no |
173228
| 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 |
174229
| maintenance\_window | Maintenance window. | `string` | `"sun:05:00-sun:06:00"` | no |
175230
| managedby | ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'. | `string` | `"[email protected]"` | no |
231+
| memcached\_route53\_record\_enabled | Whether to create Route53 record memcached set. | `bool` | `false` | no |
232+
| memcached\_ssm\_parameter\_endpoint\_enabled | Name of the parameter. | `bool` | `false` | no |
176233
| multi\_az\_enabled | Specifies whether to enable Multi-AZ Support for the replication group. If true, automatic\_failover\_enabled must also be enabled. Defaults to false. | `bool` | `false` | no |
177234
| name | Name (e.g. `app` or `cluster`). | `string` | `""` | no |
178235
| node\_type | The compute and memory capacity of the nodes in the node group. | `string` | `"cache.t2.small"` | no |
179236
| notification\_topic\_arn | An Amazon Resource Name (ARN) of an SNS topic to send ElastiCache notifications to. | `string` | `""` | no |
180-
| num\_cache\_clusters | (Required for Cluster Mode Disabled) The number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. | `string` | `""` | no |
237+
| num\_cache\_clusters | (Required for Cluster Mode Disabled) The number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. | `number` | `1` | no |
181238
| num\_cache\_nodes | (Required unless replication\_group\_id is provided) The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcache, this value must be between 1 and 20. If this number is reduced on subsequent runs, the highest numbered nodes will be removed. | `number` | `1` | no |
182-
| num\_node\_groups | Number of Shards (nodes). | `string` | `""` | no |
183239
| parameter\_group\_name | The name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used. | `string` | `"default.redis5.0"` | no |
184240
| port | the port number on which each of the cache nodes will accept connections. | `string` | `""` | no |
185-
| replicas\_per\_node\_group | Replicas per Shard. | `string` | `""` | no |
186-
| replication\_enabled | (Redis only) Enabled or disabled replication\_group for redis standalone instance. | `bool` | `false` | no |
241+
| protocol | The protocol. If not icmp, tcp, udp, or all use the. | `string` | `"tcp"` | no |
242+
| replicas\_per\_node\_group | Replicas per Shard. | `number` | `2` | no |
243+
| replication\_group\_description | Name of either the CloudWatch Logs LogGroup or Kinesis Data Firehose resource. | `string` | `"User-created description for the replication group."` | no |
187244
| replication\_group\_id | The replication group identifier This parameter is stored as a lowercase string. | `string` | `""` | no |
188245
| repository | Terraform current module repo | `string` | `"https://github.com/clouddrove/terraform-aws-elasticache"` | no |
189246
| retention\_in\_days | Specifies the number of days you want to retain log events in the specified log group. | `number` | `0` | no |
190-
| security\_group\_ids | One or more VPC security groups associated with the cache cluster. | `list` | `[]` | no |
247+
| route53\_record\_enabled | Whether to create Route53 record set. | `bool` | `false` | no |
248+
| route53\_ttl | (Required for non-alias records) The TTL of the record. | `string` | `""` | no |
249+
| route53\_type | The record type. Valid values are A, AAAA, CAA, CNAME, MX, NAPTR, NS, PTR, SOA, SPF, SRV and TXT. | `string` | `""` | no |
250+
| route53\_zone\_id | Zone ID. | `string` | n/a | yes |
191251
| security\_group\_names | A list of cache security group names to associate with this replication group. | `any` | `null` | no |
252+
| sg\_description | The security group description. | `string` | `"Instance default security group (only egress access is allowed)."` | no |
253+
| sg\_egress\_description | Description of the egress and ingress rule | `string` | `"Description of the rule."` | no |
254+
| sg\_egress\_ipv6\_description | Description of the egress\_ipv6 rule | `string` | `"Description of the rule."` | no |
255+
| sg\_ids | of the security group id. | `list(any)` | `[]` | no |
256+
| sg\_ingress\_description | Description of the ingress rule | `string` | `"Description of the ingress rule use elasticache."` | no |
192257
| snapshot\_arns | A single-element string list containing an Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. | `any` | `null` | no |
193258
| snapshot\_name | The name of a snapshot from which to restore data into the new node group. Changing the snapshot\_name forces a new resource. | `string` | `""` | no |
194259
| snapshot\_retention\_limit | (Redis only) The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted. If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. Please note that setting a snapshot\_retention\_limit is not supported on cache.t1.micro or cache.t2.\* cache nodes. | `string` | `"0"` | no |
195-
| snapshot\_window | (Redis only) The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. The minimum snapshot window is a 60 minute period. | `any` | `null` | no |
196-
| subnet\_ids | List of VPC Subnet IDs for the cache subnet group. | `list` | `[]` | no |
260+
| snapshot\_window | (Redis only) The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. The minimum snapshot window is a 60 minute period. | `string` | `null` | no |
261+
| ssm\_paramete\_kms\_key\_id | KMS key ID or ARN for encrypting a SecureString. | `string` | `""` | no |
262+
| ssm\_parameter\_description | SSM Parameters can be imported using. | `string` | `"Description of the parameter."` | no |
263+
| ssm\_parameter\_enabled | Name of the parameter. | `bool` | `true` | no |
264+
| ssm\_parameter\_endpoint\_enabled | Name of the parameter. | `bool` | `false` | no |
265+
| ssm\_parameter\_type | Type of the parameter. | `string` | `"SecureString"` | no |
266+
| subnet\_group\_description | Description for the cache subnet group. Defaults to `Managed by Terraform`. | `string` | `"The Description of the ElastiCache Subnet Group."` | no |
267+
| subnet\_ids | List of VPC Subnet IDs for the cache subnet group. | `list(any)` | `[]` | no |
197268
| transit\_encryption\_enabled | Whether to enable encryption in transit. | `bool` | `true` | no |
269+
| vpc\_id | The ID of the VPC that the instance security group belongs to. | `string` | `""` | no |
198270

199271
## Outputs
200272

201273
| Name | Description |
202274
|------|-------------|
275+
| Memcached\_ssm\_name | A list of all of the parameter values |
276+
| hostname | DNS hostname |
203277
| id | Redis cluster id. |
204278
| memcached\_arn | Memcached arn |
205279
| memcached\_endpoint | Memcached endpoint address. |
280+
| memcached\_hostname | DNS hostname |
206281
| port | Redis port. |
207282
| redis\_arn | Redis arn |
208283
| redis\_endpoint | Redis endpoint address. |
284+
| redis\_ssm\_name | A list of all of the parameter values |
285+
| sg\_id | n/a |
209286
| tags | A mapping of tags to assign to the resource. |
210287

211288

0 commit comments

Comments
 (0)