@@ -2,45 +2,43 @@ An example that launches a redis cluster inside a VPC with open access.
2
2
3
3
4
4
``` terraform
5
-
6
5
provider "aws" {
7
6
region = "us-east-1"
8
7
}
9
8
10
9
module "elasticache_redis" {
11
- source = "github.com/turnerlabs/terraform-aws-elasticache-redis?ref=v1.1"
12
-
13
- cluster_id = "myteam-myapp-dev"
14
-
15
- vpc_id = "vpc-d070efb3"
16
- private_subnet_ids = "subnet-020d8b59,subnet-13f50b64"
10
+ source = "github.com/turnerlabs/terraform-aws-elasticache-redis?ref=v2.1"
17
11
18
- engine_version = "2.8.24"
19
- instance_type = "cache.m3.medium"
12
+ cluster_id = "myteam-myapp-dev"
13
+ engine_version = "2.8.24"
14
+ instance_type = "cache.m3.medium"
20
15
maintenance_window = "sun:05:00-sun:06:00"
16
+ vpc_id = "vpc-d070efb3"
17
+ private_subnet_ids = "subnet-020d8b59,subnet-13f50b64"
21
18
22
- tag_name = "redis"
23
- tag_environment = "dev"
24
- tag_team = "myteam"
25
- tag_application = "myapp"
19
+ tag_name = "myteam-myapp-dev"
20
+ tag_team = "my-team"
21
+ tag_contact-email = "my-team@turner.com"
22
+ tag_application = "my-app"
23
+ tag_environment = "dev"
24
+ tag_customer = "my-customer"
26
25
}
27
26
28
27
resource "aws_security_group_rule" "access_in" {
29
28
security_group_id = "${module.elasticache_redis.cache_security_group_id}"
30
- type = "ingress"
31
- from_port = 6379
32
- to_port = 6379
33
- protocol = "tcp"
34
- cidr_blocks = ["0.0.0.0/0"]
29
+ type = "ingress"
30
+ from_port = 6379
31
+ to_port = 6379
32
+ protocol = "tcp"
33
+ cidr_blocks = ["0.0.0.0/0"]
35
34
}
36
35
37
36
resource "aws_security_group_rule" "access_out" {
38
37
security_group_id = "${module.elasticache_redis.cache_security_group_id}"
39
- type = "egress"
40
- from_port = 6379
41
- to_port = 6379
42
- protocol = "tcp"
43
- cidr_blocks = ["0.0.0.0/0"]
38
+ type = "egress"
39
+ from_port = 6379
40
+ to_port = 6379
41
+ protocol = "tcp"
42
+ cidr_blocks = ["0.0.0.0/0"]
44
43
}
45
-
46
44
```
0 commit comments