forked from stelligent/mu-elasticache
-
Notifications
You must be signed in to change notification settings - Fork 1
/
service-ecs.yml
86 lines (83 loc) · 2.11 KB
/
service-ecs.yml
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
Parameters:
NumCacheNodes:
Type: String
Description: Number of cache nodes
Default: 1
CacheNodeType:
Type: String
Description: The compute and memory capacity of the node(s) in the Redis Cluster
Default: "cache.m3.medium"
AllowedValues:
- cache.t2.micro
- cache.t2.small
- cache.t2.medium
- cache.m5.24xlarge
- cache.m5.large
- cache.m5.xlarge
- cache.m5.2xlarge
- cache.m5.4xlarge
- cache.m5.12xlarge
- cache.m4.large
- cache.m4.xlarge
- cache.m4.2xlarge
- cache.m4.4xlarge
- cache.m4.10xlarge
- cache.m3.medium
- cache.m3.large
- cache.m3.xlarge
- cache.m3.2xlarge
- cache.r5.24xlarge
- cache.r5.large
- cache.r5.xlarge
- cache.r5.2xlarge
- cache.r5.4xlarge
- cache.r5.12xlarge
- cache.r4.large
- cache.r4.xlarge
- cache.r4.2xlarge
- cache.r4.4xlarge
- cache.r4.8xlarge
- cache.r4.16xlarge
- cache.r3.large
- cache.r3.xlarge
- cache.r3.2xlarge
- cache.r3.4xlarge
- cache.r3.8xlarge
Resources:
ElasticacheSubnetGroup:
Type: "AWS::ElastiCache::SubnetGroup"
Properties:
Description: "Elasticache Subnet Group Name"
SubnetIds:
Fn::Split:
- ","
- Fn::ImportValue:
Ref: ServiceSubnetIds
ElasticacheSecurityGroup:
Type: "AWS::EC2::SecurityGroup"
Properties:
GroupDescription: "Elasticache Security Group"
VpcId:
Fn::ImportValue:
Ref: VpcId
SecurityGroupIngress:
-
IpProtocol: "tcp"
FromPort: "6379"
ToPort: "6379"
SourceSecurityGroupId:
Fn::ImportValue:
Ref: ServiceSecurityGroup
ElasticacheCluster:
Type: "AWS::ElastiCache::CacheCluster"
Properties:
Engine: "redis"
CacheNodeType:
Ref: CacheNodeType
NumCacheNodes:
Ref: NumCacheNodes
CacheSubnetGroupName:
Ref: ElasticacheSubnetGroup
VpcSecurityGroupIds:
- Fn::ImportValue:
Ref: ServiceSecurityGroup