SqlServerRDSFixedUidPwd.yaml [73:140]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Tags:
        -
          Key: AppName
          Value: CycleStore
  RdsS3FullAccessRole:
    Type: 'AWS::IAM::Role'
    Properties:
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
              - rds.amazonaws.com
            Action:
              - 'sts:AssumeRole'
      Path: /
      RoleName: RDS-Sqlex--S3-FullAccess
      Policies:
        - PolicyName: AmazonS3FullAccess
          PolicyDocument:
            Version: 2012-10-17
            Statement:
              - Effect: Allow
                Action: 's3:*'
                Resource: '*'
  SQLServerSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    DeletionPolicy: Delete
    Properties:
      GroupDescription: SQL Server Security Group
      SecurityGroupIngress:
      - IpProtocol: tcp
        FromPort: '1433'
        ToPort: '1433'        
        CidrIp: 0.0.0.0/0
  OptionGroup: 
    Type: AWS::RDS::OptionGroup
    Properties: 
      EngineName: sqlserver-ex
      MajorEngineVersion: "14.00"
      OptionConfigurations: 
        - 
          OptionName: SQLSERVER_BACKUP_RESTORE
          OptionSettings: 
            - 
              Name: IAM_ROLE_ARN
              Value: !GetAtt RdsS3FullAccessRole.Arn
      OptionGroupDescription: "rds-sql-ee-OptionGroup"  
  SQLDatabase:
    Type: AWS::RDS::DBInstance
    DeletionPolicy: Delete
    Properties:
      VPCSecurityGroups:
      - Fn::GetAtt:
        - SQLServerSecurityGroup
        - GroupId
      - Fn::GetAtt:
        - ECSAccessRDSSecurityGroup
        - GroupId
      DBInstanceIdentifier:
        Ref: SqlServerInstanceName
      LicenseModel: license-included
      Engine: sqlserver-ex
      EngineVersion: 14.00.3281.6.v1
      MultiAZ: false
      DBInstanceClass: db.t2.micro
      AllocatedStorage: '20'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



SqlServerRDSWithUidPwd.yaml [55:122]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Tags:
        -
          Key: AppName
          Value: CycleStore
  RdsS3FullAccessRole:
    Type: 'AWS::IAM::Role'
    Properties:
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
              - rds.amazonaws.com
            Action:
              - 'sts:AssumeRole'
      Path: /
      RoleName: RDS-Sqlex--S3-FullAccess
      Policies:
        - PolicyName: AmazonS3FullAccess
          PolicyDocument:
            Version: 2012-10-17
            Statement:
              - Effect: Allow
                Action: 's3:*'
                Resource: '*'
  SQLServerSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    DeletionPolicy: Delete
    Properties:
      GroupDescription: SQL Server Security Group
      SecurityGroupIngress:
      - IpProtocol: tcp
        FromPort: '1433'
        ToPort: '1433'                
        CidrIp: 0.0.0.0/0
  OptionGroup: 
    Type: AWS::RDS::OptionGroup
    Properties: 
      EngineName: sqlserver-ex
      MajorEngineVersion: "14.00"
      OptionConfigurations: 
        - 
          OptionName: SQLSERVER_BACKUP_RESTORE
          OptionSettings: 
            - 
              Name: IAM_ROLE_ARN
              Value: !GetAtt RdsS3FullAccessRole.Arn
      OptionGroupDescription: "rds-sql-ee-OptionGroup"  
  SQLDatabase:
    Type: AWS::RDS::DBInstance
    DeletionPolicy: Delete   
    Properties:
      VPCSecurityGroups:
      - Fn::GetAtt:
        - SQLServerSecurityGroup
        - GroupId
      - Fn::GetAtt:
        - ECSAccessRDSSecurityGroup
        - GroupId
      DBInstanceIdentifier:
        Ref: SqlServerInstanceName
      LicenseModel: license-included
      Engine: sqlserver-ex
      EngineVersion: 14.00.3281.6.v1
      MultiAZ: false
      DBInstanceClass: db.t2.micro
      AllocatedStorage: '20'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



