-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcache-template.json
More file actions
97 lines (89 loc) · 3.84 KB
/
Copy pathcache-template.json
File metadata and controls
97 lines (89 loc) · 3.84 KB
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
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "ElastiCache cluster template.",
"Metadata" : {
"AWS::CloudFormation::Interface" : {
"ParameterGroups" : [
{
"Label" : { "default" : "Cluster Config" },
"Parameters" : [ "CacheNodeType", "NumberOfCacheNodes" ]
},
{
"Label" : { "default" : "VPC Config" },
"Parameters" : [ "CacheSecurityGroup", "CacheSubnets" ]
}
],
"ParameterLabels" : {
"CacheNodeType" : { "default" : "Node type and size" },
"NumberOfCacheNodes" : { "default" : "Number of nodes" },
"CacheSecurityGroup" : { "default" : "ElastiCache node security group" },
"CacheSubnets" : { "default" : "VPC private subnets" }
}
}
},
"Parameters" : {
"CacheNodeType" : {
"Type" : "String",
"Default" : "cache.t2.micro",
"Description" : "The node compute and memory capacity.",
"AllowedValues" : [ "cache.t2.micro", "cache.t2.small", "cache.t2.medium", "cache.m3.medium", "cache.m3.large" ],
"ConstraintDescription" : "Please select a valid cache node type."
},
"NumberOfCacheNodes" : {
"Type" : "Number",
"Default" : "2",
"Description" : "The number of Cache nodes in the Cluster.",
"MinValue" : "2",
"MaxValue" : "10",
"ConstraintDescription" : "Select between 2 and 10."
},
"CacheSecurityGroup" : {
"Type" : "AWS::EC2::SecurityGroup::Id",
"Description" : "The cache node security group."
},
"CacheSubnets" : {
"Type" : "List<AWS::EC2::Subnet::Id>",
"Description" : "Select the Subnets for your cache group."
}
},
"Resources" : {
"elcCacheSubnetGroup" : {
"Type" : "AWS::ElastiCache::SubnetGroup",
"Properties" : {
"Description" : "Subnets available for the ElastiCache Cluster",
"SubnetIds" : { "Ref" : "CacheSubnets" }
}
},
"elcCacheParameters" : {
"Type" : "AWS::ElastiCache::ParameterGroup",
"Properties" : {
"CacheParameterGroupFamily" : "memcached1.4",
"Description" : "Cache Parameter Group"
}
},
"elcCacheCluster" : {
"Type": "AWS::ElastiCache::CacheCluster",
"DependsOn" : [ "elcCacheSubnetGroup", "elcCacheParameters" ],
"Properties": {
"CacheSubnetGroupName" : { "Ref" : "elcCacheSubnetGroup" },
"VpcSecurityGroupIds" : [ { "Ref" : "CacheSecurityGroup" } ],
"CacheNodeType" : { "Ref" : "CacheNodeType" },
"CacheParameterGroupName" : { "Ref" : "elcCacheParameters" },
"Engine" : "memcached",
"Port" : "11211",
"NumCacheNodes" : { "Ref" : "NumberOfCacheNodes" }
}
}
},
"Outputs" : {
"CacheCluster" : {
"Description" : "Endpoint for the Cache Cluster.",
"Value" : { "Fn::Join" : [ ":",
[
{ "Fn::GetAtt" : [ "elcCacheCluster", "ConfigurationEndpoint.Address" ] },
{ "Fn::GetAtt" : [ "elcCacheCluster", "ConfigurationEndpoint.Port" ] }
]
] }
}
}
}