-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
127 lines (98 loc) · 2.53 KB
/
main.tf
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
provider "aws" {
region = "us-east-1"
}
###################################################
# ElastiCache Redis Cluster
###################################################
module "cluster" {
source = "../../modules/elasticache-redis-cluster"
# source = "tedilabs/db/aws//modules/elasticache-redis-cluster"
# version = "~> 0.2.0"
name = "example-redis-full"
description = "Managed by Terraform."
redis_version = "6.2"
node_instance_type = "cache.t4g.micro"
# node_size = 1
sharding = {
enabled = true
shard_size = 3
replicas = 2
}
## Network
port = 6379
vpc_id = null
subnet_group = null
preferred_availability_zones = []
default_security_group = {
eanbled = true
name = "example-redis-full-default-sg"
description = "Managed by Terraform."
ingress_rules = [
{
cidr_blocks = ["0.0.0.0/0"]
}
]
}
security_groups = []
## Parameters
parameter_group = {
enabled = true
name = "example-redis-full-parameter-group"
description = "Managed by Terraform."
parameters = {
"lazyfree-lazy-eviction" = "yes"
"lazyfree-lazy-expire" = "yes"
"lazyfree-lazy-server-del" = "yes"
"rename-commands" = "KEYS BLOCKED"
}
}
custom_parameter_group = null
## Auth
password = sensitive("helloworld!#!!1234")
user_groups = []
## Encryption
encryption_at_rest = {
enabled = true
kms_key = null
}
encryption_in_transit = {
enabled = true
}
## Backup
backup_enabled = true
backup_window = "16:00-17:00"
backup_retention = 1
backup_final_snapshot_name = "example-redis-full-final"
## Source
source_backup_name = null
source_rdb_s3_arns = null
## Maintenance
maintenance_window = "fri:18:00-fri:20:00"
auto_upgrade_minor_version_enabled = true
notification_sns_topic = null
## Logging
logging_slow_log = {
enabled = false
format = "JSON"
destination_type = "CLOUDWATCH_LOGS"
destination = null
}
logging_engine_log = {
enabled = false
format = "JSON"
destination_type = "CLOUDWATCH_LOGS"
destination = null
}
## Attributes
multi_az_enabled = true
auto_failover_enabled = true
apply_immediately = true
timeouts = {
create = "60m"
update = "40m"
delete = "40m"
}
tags = {
"project" = "terraform-aws-db-examples"
}
}