From 7bb7bc6329605043723a6b9ccc81f70324b36d03 Mon Sep 17 00:00:00 2001 From: danmgs Date: Mon, 25 Nov 2019 15:19:33 +0100 Subject: [PATCH] Fix condition to create inbound for Resource SecurityGroupIngress --- templates/elasticache.cfn.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/templates/elasticache.cfn.yml b/templates/elasticache.cfn.yml index dd0fbe02..c4fd909d 100644 --- a/templates/elasticache.cfn.yml +++ b/templates/elasticache.cfn.yml @@ -78,7 +78,7 @@ Parameters: Conditions: - IsRedis: !Equals [ !Ref CacheEngine, redis] + IsRedis: !Equals [ !Ref CacheEngine, 'redis'] Resources: @@ -89,13 +89,11 @@ Resources: VpcId: Fn::ImportValue: !Sub ${NetworkStackName}-VpcID SecurityGroupIngress: - - - IpProtocol: tcp + - IpProtocol: tcp FromPort: !If [ IsRedis, 6379, 11211] ToPort: !If [ IsRedis, 6379, 11211] Tags: - - - Key: Name + - Key: Name Value: !Sub "${AWS::StackName}-ElastiCacheSecurityGroup" SubnetGroup: