|
|
@@ -356,6 +356,10 @@ Resources:
|
|
|
FromPort: '2049'
|
|
|
ToPort: '2049'
|
|
|
IpProtocol: tcp
|
|
|
+ - SourceSecurityGroupId: !Ref lambdasg
|
|
|
+ FromPort: '2049'
|
|
|
+ ToPort: '2049'
|
|
|
+ IpProtocol: tcp
|
|
|
SecurityGroupEgress:
|
|
|
- CidrIp: 0.0.0.0/0
|
|
|
IpProtocol: '-1'
|
|
|
@@ -388,6 +392,53 @@ Resources:
|
|
|
Metadata:
|
|
|
'AWS::CloudFormation::Designer':
|
|
|
id: 00338a06-280d-4c12-9255-b77136a19138
|
|
|
+ rdssg:
|
|
|
+ Type: 'AWS::EC2::SecurityGroup'
|
|
|
+ Properties:
|
|
|
+ GroupDescription: sg_rds
|
|
|
+ GroupName: sg_rds
|
|
|
+ Tags:
|
|
|
+ - Key: Name
|
|
|
+ Value: sg_rds
|
|
|
+ SecurityGroupIngress:
|
|
|
+ - SourceSecurityGroupId: !Ref webgroup
|
|
|
+ FromPort: '3306'
|
|
|
+ ToPort: '3306'
|
|
|
+ IpProtocol: tcp
|
|
|
+ - SourceSecurityGroupId: !Ref webgroup
|
|
|
+ FromPort: '5432'
|
|
|
+ ToPort: '5432'
|
|
|
+ IpProtocol: tcp
|
|
|
+ - SourceSecurityGroupId: !Ref lambdasg
|
|
|
+ FromPort: '5432'
|
|
|
+ ToPort: '5432'
|
|
|
+ IpProtocol: tcp
|
|
|
+ - SourceSecurityGroupId: !Ref lambdasg
|
|
|
+ FromPort: '3306'
|
|
|
+ ToPort: '3306'
|
|
|
+ IpProtocol: tcp
|
|
|
+ SecurityGroupEgress:
|
|
|
+ - CidrIp: 0.0.0.0/0
|
|
|
+ IpProtocol: '-1'
|
|
|
+ VpcId: !Ref vpc1
|
|
|
+ Metadata:
|
|
|
+ 'AWS::CloudFormation::Designer':
|
|
|
+ id: 6efe5731-b5ea-4e23-9b48-1353eaea32a1
|
|
|
+ lambdasg:
|
|
|
+ Type: 'AWS::EC2::SecurityGroup'
|
|
|
+ Properties:
|
|
|
+ GroupDescription: sg_lambda
|
|
|
+ GroupName: sg_lambda
|
|
|
+ Tags:
|
|
|
+ - Key: Name
|
|
|
+ Value: sg_lambda
|
|
|
+ SecurityGroupEgress:
|
|
|
+ - CidrIp: 0.0.0.0/0
|
|
|
+ IpProtocol: '-1'
|
|
|
+ VpcId: !Ref vpc1
|
|
|
+ Metadata:
|
|
|
+ 'AWS::CloudFormation::Designer':
|
|
|
+ id: 6efe5731-b5ea-4e23-9b48-1353eaea32a1
|
|
|
Parameters:
|
|
|
vpccidr:
|
|
|
Type: String
|
|
|
@@ -417,27 +468,27 @@ Parameters:
|
|
|
Type: String
|
|
|
Default: sg_ai
|
|
|
Outputs:
|
|
|
- pubnet1id:
|
|
|
+ PUBnet1id:
|
|
|
Value: !Ref pubnet1
|
|
|
- pubnet2id:
|
|
|
+ PUBnet2id:
|
|
|
Value: !Ref pubnet2
|
|
|
- webnet1id:
|
|
|
+ WEBbnet1id:
|
|
|
Value: !Ref webnet1
|
|
|
- webnet2id:
|
|
|
+ WEBnet2id:
|
|
|
Value: !Ref webnet2
|
|
|
- dbnet1id:
|
|
|
+ DBnet1id:
|
|
|
Value: !Ref dbnet1
|
|
|
- dbnet2id:
|
|
|
+ DBnet2id:
|
|
|
Value: !Ref dbnet2
|
|
|
- vpcid:
|
|
|
+ Vpcid:
|
|
|
Value: !Ref vpc1
|
|
|
- elbsg:
|
|
|
+ ELBsg:
|
|
|
Value: !Ref elbgroup
|
|
|
- serversg:
|
|
|
+ ServerSG:
|
|
|
Value: !Ref webgroup
|
|
|
- dbsg:
|
|
|
+ MemSg:
|
|
|
Value: !Ref dbgroup
|
|
|
- efs00sg:
|
|
|
+ EFSsg:
|
|
|
Value: !Ref efssg
|
|
|
- redis00sg:
|
|
|
+ RedisSg:
|
|
|
Value: !Ref redissg
|