forked from clouddrove/terraform-aws-elasticache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.yaml
109 lines (101 loc) · 4.06 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
---
#
# 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: "Terraform"
image: "https://img.shields.io/badge/terraform-v1.1.7-green"
url: "https://www.terraform.io"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
- 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: "static-checks"
image: "https://github.com/clouddrove/terraform-aws-elasticache/actions/workflows/terraform.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-aws-elasticache/actions/workflows/terraform.yml"
# description of this project
# yamllint disable rule:line-length
description: |-
Terraform module to create Elasticache Cluster and replica for Redis and Memcache.
# extra content
include:
- "terraform.md"
# How to use this project
# yamllint disable rule:line-length
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.0.1"
name = "redis"
environment = "test"
label_order = ["environment", "name"]
engine = "redis"
engine_version = "5.0.0"
family = "redis5.0"
port = 6379
node_type = "cache.t2.micro"
subnet_ids = ["subnet-xxxxxxx","subnet-xxxxxxx","subnet-xxxxxxx"]
security_group_ids = ["sg-xxxxxxxxx"]
availability_zones = ["eu-west-1a","eu-west-1b" ]
auto_minor_version_upgrade = true
number_cache_clusters = 2
}
```
### Redis Cluster
```hcl
module "redis-cluster" {
source = "clouddrove/elasticache/aws
version = "1.0.1"
name = "cluster"
environment = "test"
label_order = ["environment","name"]
cluster_replication_enabled = true
engine = "redis"
engine_version = "5.0.0"
family = "redis5.0"
port = 6379
node_type = "cache.t2.micro"
subnet_ids = module.subnets.public_subnet_id
security_group_ids = [module.redis-sg.security_group_ids]
availability_zones = ["eu-west-1a","eu-west-1b" ]
auto_minor_version_upgrade = true
replicas_per_node_group = 2
num_node_groups = 1
automatic_failover_enabled = true
}
```
### Memcache
```hcl
module "memcached" {
source = "clouddrove/elasticache/aws
version = "1.0.1"
name = "memcached"
environment = "test"
label_order = ["environment", "name"]
cluster_enabled = true
engine = "memcached"
engine_version = "1.5.10"
family = "memcached1.5"
parameter_group_name = "default.memcached1.5"
az_mode = "cross-az"
port = 11211
node_type = "cache.t2.micro"
num_cache_nodes = 2
subnet_ids = ["subnet-xxxxxxx","subnet-xxxxxxx","subnet-xxxxxxx"]
security_group_ids = ["sg-xxxxxxxxx"]
availability_zones = ["eu-west-1a","eu-west-1b" ]
}
```