updating RDS CF
This commit is contained in:
@@ -11,15 +11,15 @@ Parameters:
|
|||||||
to prepend the name of other resources in other templates.
|
to prepend the name of other resources in other templates.
|
||||||
Type: String
|
Type: String
|
||||||
Resources:
|
Resources:
|
||||||
VPCSecurityGroupIngress:
|
# VPCSecurityGroupIngress:
|
||||||
Type: AWS::EC2::SecurityGroupIngress
|
# Type: AWS::EC2::SecurityGroupIngress
|
||||||
Properties:
|
# Properties:
|
||||||
GroupId:
|
# GroupId:
|
||||||
Fn::ImportValue: !Sub "${StackName}-PublicVPCIDDefaultSecurityGroup"
|
# Fn::ImportValue: !Sub "${StackName}-PublicVPCIDDefaultSecurityGroup"
|
||||||
IpProtocol: tcp
|
# IpProtocol: tcp
|
||||||
FromPort: 5432
|
# FromPort: 5432
|
||||||
ToPort: 5432
|
# ToPort: 5432
|
||||||
CidrIp: 0.0.0.0/0
|
# CidrIp: 0.0.0.0/0
|
||||||
RDSSubnetGroup:
|
RDSSubnetGroup:
|
||||||
Type: AWS::RDS::DBSubnetGroup
|
Type: AWS::RDS::DBSubnetGroup
|
||||||
Properties:
|
Properties:
|
||||||
@@ -28,7 +28,19 @@ Resources:
|
|||||||
- Fn::ImportValue: !Sub "${StackName}-PublicSubnet0"
|
- Fn::ImportValue: !Sub "${StackName}-PublicSubnet0"
|
||||||
- Fn::ImportValue: !Sub "${StackName}-PublicSubnet1"
|
- Fn::ImportValue: !Sub "${StackName}-PublicSubnet1"
|
||||||
- Fn::ImportValue: !Sub "${StackName}-PublicSubnet2"
|
- Fn::ImportValue: !Sub "${StackName}-PublicSubnet2"
|
||||||
rdsDBInstance:
|
RDSSecurityGroup:
|
||||||
|
Type: AWS::EC2::SecurityGroup
|
||||||
|
Properties:
|
||||||
|
GroupName: !Sub "${AWS::StackName}-RDS-SecurityGroup"
|
||||||
|
GroupDescription: Security Group for RDS allowing ingress on DB port only.
|
||||||
|
VpcId:
|
||||||
|
Fn::ImportValue: !Sub "${StackName}-PublicVPC"
|
||||||
|
SecurityGroupIngress:
|
||||||
|
IpProtocol: tcp
|
||||||
|
FromPort: 5432
|
||||||
|
ToPort: 5432
|
||||||
|
CidrIp: 0.0.0.0/0
|
||||||
|
RDSDBInstance:
|
||||||
Type: AWS::RDS::DBInstance
|
Type: AWS::RDS::DBInstance
|
||||||
Properties:
|
Properties:
|
||||||
AllocatedStorage: 5
|
AllocatedStorage: 5
|
||||||
@@ -42,5 +54,5 @@ Resources:
|
|||||||
MasterUserPassword: password
|
MasterUserPassword: password
|
||||||
PubliclyAccessible: true
|
PubliclyAccessible: true
|
||||||
VPCSecurityGroups:
|
VPCSecurityGroups:
|
||||||
- Fn::ImportValue: !Sub "${StackName}-PublicVPCIDDefaultSecurityGroup"
|
- !Ref RDSSecurityGroup
|
||||||
DBSubnetGroupName: !Ref RDSSubnetGroup
|
DBSubnetGroupName: !Ref RDSSubnetGroup
|
||||||
|
|||||||
Reference in New Issue
Block a user