forked from clouddrove/terraform-aws-elasticache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.yaml
167 lines (147 loc) · 5.5 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: Terraform AWS Elasticache
# License of this project
license: "APACHE"
# Canonical GitHub repo
github_repo: clouddrove/terraform-aws-elasticache
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/clouddrove/terraform-aws-elasticache.svg"
url: "https://github.com/clouddrove/terraform-aws-elasticache/releases/latest"
- name: "tfsec"
image: "https://github.com/clouddrove/terraform-aws-elasticache/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-aws-elasticache/actions/workflows/tfsec.yml"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
# description of this project
description: |-
Terraform module to create Elasticache Cluster and replica for Redis and Memcache.
# extra content
include:
- "terraform.md"
# How to use this project
# How to use this project
usage : |-
Here are some examples of how you can use this module in your inventory structure:
### Redis
```hcl
module "redis" {
source = "clouddrove/elasticache/aws
version = "1.3.0"
name = "redis"
environment = "test"
label_order = ["name", "environment"]
vpc_id = module.vpc.vpc_id
allowed_ip = [module.vpc.vpc_cidr_block]
allowed_ports = [6379]
cluster_replication_enabled = true
engine = "redis"
engine_version = "7.0"
parameter_group_name = "default.redis7"
port = 6379
node_type = "cache.t2.micro"
subnet_ids = module.subnets.public_subnet_id
availability_zones = [""]
automatic_failover_enabled = false
multi_az_enabled = false
num_cache_clusters = 1
retention_in_days = 0
snapshot_retention_limit = 7
log_delivery_configuration = [
{
destination_type = "cloudwatch-logs"
log_format = "json"
log_type = "slow-log"
},
{
destination_type = "cloudwatch-logs"
log_format = "json"
log_type = "engine-log"
}
]
extra_tags = {
Application = "CloudDrove"
}
route53_record_enabled = true
ssm_parameter_endpoint_enabled = true
dns_record_name = "prod"
route53_ttl = "300"
route53_type = "CNAME"
route53_zone_id = "Z017xxxxDLxxx0GH04"
}
```
### Redis Cluster
```hcl
module "redis-cluster" {
source = "clouddrove/elasticache/aws
version = "1.3.0"
name = "redis-cluster"
environment = "test"
label_order = ["environment", "name"]
vpc_id = module.vpc.vpc_id
allowed_ip = [module.vpc.vpc_cidr_block]
allowed_ports = [6379]
cluster_replication_enabled = true
engine = "redis"
engine_version = "7.0"
parameter_group_name = "default.redis7.cluster.on"
port = 6379
node_type = "cache.t2.micro"
subnet_ids = module.subnets.public_subnet_id
availability_zones = ["eu-west-1a", "eu-west-1b"]
num_cache_nodes = 1
snapshot_retention_limit = 7
automatic_failover_enabled = true
extra_tags = {
Application = "CloudDrove"
}
route53_record_enabled = false
ssm_parameter_endpoint_enabled = false
dns_record_name = "prod"
route53_ttl = "300"
route53_type = "CNAME"
route53_zone_id = "SERFxxxx6XCsY9Lxxxxx"
}
```
### Memcache
```hcl
module "memcached" {
source = "clouddrove/elasticache/aws
version = "1.3.0"
name = "memcached"
environment = "test"
label_order = ["name", "environment"]
vpc_id = module.vpc.vpc_id
allowed_ip = [module.vpc.vpc_cidr_block]
allowed_ports = [11211]
cluster_enabled = true
memcached_ssm_parameter_endpoint_enabled = true
memcached_route53_record_enabled = true
engine = "memcached"
engine_version = "1.6.17"
family = "memcached1.5"
parameter_group_name = ""
az_mode = "cross-az"
port = 11211
node_type = "cache.t2.micro"
num_cache_nodes = 2
subnet_ids = module.subnets.public_subnet_id
availability_zones = ["eu-west-1a", "eu-west-1b"]
extra_tags = {
Application = "CloudDrove"
}
route53_record_enabled = false
ssm_parameter_endpoint_enabled = false
dns_record_name = "prod"
route53_ttl = "300"
route53_type = "CNAME"
route53_zone_id = "SERFxxxx6XCsY9Lxxxxx"
}
```