-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathElastiCache.config
More file actions
49 lines (47 loc) · 1.67 KB
/
Copy pathElastiCache.config
File metadata and controls
49 lines (47 loc) · 1.67 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
##
# This sample adds an ElastiCache cluster to the environment.
# From: https://s3.amazonaws.com/elasticbeanstalk/extensions/ElastiCache.config
# See also: https://forums.aws.amazon.com/thread.jspa?threadID=117131
# and http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-environment-resources-examples.html
# It does not provide credentials for accessing that elasticache cluster or on-instance scripts.
#
# Customers would generally not edit this file.
# Instead, they would have another file sitting in the same directory (or anywhere) with
# an option-settings section such as the following (all of these are showing the default value)
#
# option-settings:
# "aws:elasticbeanstalk:customoption" :
# CacheNodeType : cache.m1.small
# NumCacheNodes : 1
# Engine : memcached
#
##
Resources:
MyElastiCache:
Type: AWS::ElastiCache::CacheCluster
Properties:
CacheNodeType:
Fn::GetOptionSetting:
OptionName : CacheNodeType
DefaultValue: cache.m1.small
NumCacheNodes:
Fn::GetOptionSetting:
OptionName : NumCacheNodes
DefaultValue: 1
Engine:
Fn::GetOptionSetting:
OptionName : Engine
DefaultValue: memcached
CacheSecurityGroupNames:
- Ref: MyCacheSecurityGroup
MyCacheSecurityGroup:
Type: AWS::ElastiCache::SecurityGroup
Properties:
Description: "Lock cache down to webserver access only"
MyCacheSecurityGroupIngress:
Type: AWS::ElastiCache::SecurityGroupIngress
Properties:
CacheSecurityGroupName:
Ref: MyCacheSecurityGroup
EC2SecurityGroupName:
Ref: AWSEBSecurityGroup