Skip to content

Commit

Permalink
Merge pull request #242 from gcivil-nyu-org/jasmine_dev
Browse files Browse the repository at this point in the history
elastic cache
  • Loading branch information
jazwu committed Apr 22, 2024
2 parents 5ee6b81 + 96dfa6c commit 27c4fd9
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .ebextensions/elastic_cache.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Resources:
MyCacheSecurityGroup:
Type: "AWS::EC2::SecurityGroup"
Properties:
GroupDescription: "Lock cache down to webserver access only"
SecurityGroupIngress :
- IpProtocol : "tcp"
FromPort :
Fn::GetOptionSetting:
OptionName : "CachePort"
DefaultValue: "6379"
ToPort :
Fn::GetOptionSetting:
OptionName : "CachePort"
DefaultValue: "6379"
SourceSecurityGroupName:
Ref: "AWSEBSecurityGroup"
MyElastiCache:
Type: "AWS::ElastiCache::CacheCluster"
Properties:
CacheNodeType:
Fn::GetOptionSetting:
OptionName : "CacheNodeType"
DefaultValue : "cache.t2.micro"
NumCacheNodes:
Fn::GetOptionSetting:
OptionName : "NumCacheNodes"
DefaultValue : "1"
Engine:
Fn::GetOptionSetting:
OptionName : "Engine"
DefaultValue : "redis"
VpcSecurityGroupIds:
-
Fn::GetAtt:
- MyCacheSecurityGroup
- GroupId

Outputs:
ElastiCache:
Description: "ID of ElastiCache Cache Cluster with Redis Engine"
Value :
Ref : "MyElastiCache"

0 comments on commit 27c4fd9

Please sign in to comment.