Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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