AWSTemplateFormatVersion: '2010-09-09'
Description: PeopleSoft RDS Instance - Will build an RDS instance based on the snapshot passed
Parameters:
SecurityGroupCloudFormationName:
Description: CloudFormation Security Group Name
Type: String
Default: "PeopleSoftSG"
PillarLowerCase:
Description: Lower Case Environment Pillar Identifier (el, hr, or sa)
Type: String
Default: "el"
EnvironmentLowerCase:
Description: Loser Case Environment Identifier (dev, tst, stg, prd, etc.)
Type: String
Default: "dev"
PillarUpperCase:
Description: Upper Case Environment Pillar Identifier (EL, HR, or SA)
Type: String
Default: "EL"
EnvironmentUpperCase:
Description: Upper Case Environment Identifier (DEV, TST, STG, PRD, etc.)
Type: String
Default: "DEV"
DBSnapshotID:
Description: DB Snapshot from Which to Restore From
Type: String
Default: "peoplesoft-eldev-final-snapshot"
DBMultiAz:
Description: DB Multi Availibility Zone Deployment (boolean)
Type: String
Default: "false"
DBInstanceClass:
Description: DB Instance Class
Type: String
Default: "db.t2.large"
DBStorageType:
Description: DB Storage Type (gp2-SSD, io1-Provisioned IOPS)
Type: String
Default: "gp2"
TagService:
Description: Refers to the application (Uaccess Learning, Uaccess Employee, Uaccess Student)
Type: String
Default: "Uaccess Learning"
TagContactNetid:
Description: NetID of person most familiar with resource
Type: String
Default: "kellehs"
TagAccountNumber:
Description: Identifies the financial system account number
Type: String
Default: "Human Resources Systems"
TagSubAccount:
Description: Identifies the financial system subaccount number
Type: String
Default: "Uaccess Learning"
TagTicketNumber:
Description: Jira Ticket Number
Type: String
Default: "CLOUD-15"
#Resources for this CloudFormation Stack
Resources:
DBInstance:
Type: AWS::RDS::DBInstance
Properties:
DBInstanceIdentifier: !Sub "peoplesoft-${PillarLowerCase}${EnvironmentLowerCase}"
DBName: !Sub "${PillarUpperCase}${EnvironmentUpperCase}"
DBSnapshotIdentifier: !Ref "DBSnapshotID"
MultiAZ: !Ref "DBMultiAz"
Engine: "oracle-ee"
LicenseModel: "bring-your-own-license"
DBInstanceClass: !Ref "DBInstanceClass"
DBParameterGroupName: "peoplesoft-oracle-ee-12-1"
StorageType: !Ref "DBStorageType"
DBSubnetGroupName:
Fn::ImportValue:
!Sub "${SecurityGroupCloudFormationName}-RDSSubnetGroup"
VPCSecurityGroups:
- Fn::ImportValue:
!Sub "${SecurityGroupCloudFormationName}-DbSg"
Tags:
- Key: service
Value: !Ref "TagService"
- Key: Name
Value: !Sub "peoplesoft-${PillarLowerCase}${EnvironmentLowerCase}"
- Key: environment
Value: !Ref "EnvironmentLowerCase"
- Key: contactnetid
Value: !Ref "TagContactNetid"
- Key: accountnumber
Value: !Ref "TagAccountNumber"
- Key: ticketnumber
Value: !Ref "TagTicketNumber"
#This will create a final snapshot when the database is removed
#DeletionPolicy: "Snapshot"