September 2018
Intermediate to advanced
386 pages
11h 17m
English
Now that we have provisioned the VPC and the security groups, let's proceed to provision the RDS Cluster. The following code block goes in a new file, named rds.yml, which is in resources/ of the root directory:
Resources: letsPollDBSubnetGroup: Type: AWS::RDS::DBSubnetGroup Properties: DBSubnetGroupDescription: "RDS Subnet Group" SubnetIds: - Ref: letsPollPrivateSubnet1 - Ref: letsPollPrivateSubnet2 letsPollDatabase: Type: "AWS::RDS::DBInstance" Properties: DBName: ${env:LP_DATABASE_NAME}" AllocatedStorage: 5 DBInstanceClass: "db.t2.micro" Engine: "postgres" EngineVersion: "9.5.4" MasterUsername: ${env:LP_DATABASE_USERNAME} MasterUserPassword: ${env:LP_DATABASE_PASSWORD} VPCSecurityGroups: - "Fn::GetAtt": databaseSecurityGroup.GroupId ...Read now
Unlock full access