AWSTemplateFormatVersion: 2010-09-09 Description: This template creates a RDS SQL instance in private subnet. (qs-1r2g4124k) Parameters: SubnetIDs: Description: Comma separated Subnet IDs where Gateway VMs need to be launched Type: List VPCID: Type: 'AWS::EC2::VPC::Id' VPCCIDR: Description: CIDR block for the VPC Type: String RDSDBName: Description: RDS Database Name Type: String RDSAllocatedStorage: Description: Storage amount to be allocated to RDS DB Instance Type: String RDSMaxAllocatedStorage: Description: The upper limit to which Amazon RDS can automatically scale the storage of the DB instance. Type: String RDSUsername: Description: RDS DB username Type: String RDSPassword: Description: RDS DB password Type: String NoEcho: 'true' Resources: DbSecurityGroup: Type: 'AWS::EC2::SecurityGroup' Properties: GroupDescription: Security Group allowing access to the DB instance GroupName: !Join - '-' - - !Ref 'AWS::StackName' - UiPathHaaSecurityGroup Tags: - Key: Name Value: !Join - '-' - - !Ref 'AWS::StackName' - UiPathHaaSecurityGroup VpcId: !Ref VPCID SecurityGroupIngress: - IpProtocol: tcp FromPort: 1433 ToPort: 1433 CidrIp: !Ref VPCCIDR SecurityGroupEgress: - IpProtocol: tcp FromPort: 0 ToPort: 65535 CidrIp: 0.0.0.0/0 DBSubnetGroup: Type: 'AWS::RDS::DBSubnetGroup' Properties: DBSubnetGroupDescription: RDS-MSSQL private subnet group DBSubnetGroupName: !Sub '${AWS::StackName}-RDS-Subnet-Group' SubnetIds: !Ref SubnetIDs Tags: - Key: Name Value: !Sub '${AWS::StackName}-RDS-Subnet-Group' RDSDBInstance: Type: 'AWS::RDS::DBInstance' Properties: AllocatedStorage: !Ref RDSAllocatedStorage MaxAllocatedStorage: !Ref RDSMaxAllocatedStorage BackupRetentionPeriod: 1 DBInstanceClass: db.m5.large DBInstanceIdentifier: !Ref RDSDBName DBSubnetGroupName: !Ref DBSubnetGroup Engine: sqlserver-se EngineVersion: 14.00.3381.3.v1 LicenseModel: license-included MasterUsername: !Ref RDSUsername MasterUserPassword: !Ref RDSPassword MultiAZ: true PubliclyAccessible: false StorageType: gp2 VPCSecurityGroups: - !Ref DbSecurityGroup Outputs: DBSubnetGroup: Value: !Ref DBSubnetGroup Description: RDS-MSSQL private subnet group RDSDBInstanceID: Value: !Ref RDSDBInstance Description: RDS-MSSQL Database Instance ID RDSDBInstanceEndpointAddress: Value: !GetAtt - RDSDBInstance - Endpoint.Address Description: RDS-MSSQL Database Instance Endpoint Address RDSDBInstanceEndpointPort: Value: !GetAtt - RDSDBInstance - Endpoint.Port Description: RDS-MSSQL Database Instance Endpoint Port