Skip to content

Commit f7e51c7

Browse files
committed
added more examples
1 parent d90444d commit f7e51c7

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

examples/open/readme.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
An example that launches a redis cluster inside a VPC with open access.
2+
3+
4+
```terraform
5+
6+
provider "aws" {
7+
region = "us-east-1"
8+
}
9+
10+
module "elasticache_redis" {
11+
source = "github.com/turnerlabs/terraform-aws-elasticache-redis"
12+
13+
vpc_id = "vpc-d070efb3"
14+
private_subnet_ids = "subnet-020d8b59,subnet-13f50b64"
15+
16+
engine_version = "2.8.24"
17+
instance_type = "cache.m3.medium"
18+
maintenance_window = "sun:05:00-sun:06:00"
19+
20+
tag_name = "redis"
21+
tag_description = "redis cluster for development"
22+
tag_creator = "jritsema"
23+
tag_product = "poc"
24+
tag_customer = "jritsema"
25+
tag_owner = "jritsema"
26+
tag_environment = "dev"
27+
tag_costcenter = "TBD"
28+
}
29+
30+
resource "aws_security_group_rule" "access_in" {
31+
security_group_id = "${module.elasticache_redis.cache_security_group_id}"
32+
type = "ingress"
33+
from_port = 6379
34+
to_port = 6379
35+
protocol = "tcp"
36+
cidr_blocks = ["0.0.0.0/0"]
37+
}
38+
39+
resource "aws_security_group_rule" "access_out" {
40+
security_group_id = "${module.elasticache_redis.cache_security_group_id}"
41+
type = "egress"
42+
from_port = 6379
43+
to_port = 6379
44+
protocol = "tcp"
45+
cidr_blocks = ["0.0.0.0/0"]
46+
}
47+
48+
```

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# terraform-aws-elasticache-redis
22

3-
A Terraform module to create an Amazon Web Services (AWS) Redis ElastiCache cluster.
3+
A Terraform module that represents an AWS ElastiCache Redis cluster. Note that a default security group is created and outputted that can be extended. See basic example usage below and more examples [here](/examples).
44

55
### Usage
66

0 commit comments

Comments
 (0)