Skip to content

Instantly share code, notes, and snippets.

@nathanpeck
Created February 7, 2018 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanpeck/0f48179ac8e347cd0c64f4e8d45920d5 to your computer and use it in GitHub Desktop.
Save nathanpeck/0f48179ac8e347cd0c64f4e8d45920d5 to your computer and use it in GitHub Desktop.
# Security group to add the Redis cluster to the VPC,
# and to allow the Fargate containers to talk to Redis on port 6379
RedisSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: "Redis Security Group"
VpcId:
Fn::ImportValue:
!Join [':', [!Ref 'EnvironmentName', 'VPCId']]
RedisIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
Description: Ingress from Fargate containers
GroupId: !Ref 'RedisSecurityGroup'
IpProtocol: tcp
FromPort: 6379
ToPort: 6379
SourceSecurityGroupId:
Fn::ImportValue:
!Join [':', [!Ref 'EnvironmentName', 'FargateContainerSecurityGroup']]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment