CFN/Modernization-Resources-CFN.yml [188:267]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Default: ""

  # -----------------------------------
  StaticHostingBucketName:
    Type: String
    Description: "Name of the bucket used to host static UI content"
    Default: "unishopui"

Resources:

  # Elastic Beanstalk resources.
  # Deploy the monolithic application in a Windows Server instance.
  # Securtiy groups for resource.
  EBSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: "Security Group to allow EB aplication to accept HTTP requests"
      SecurityGroupIngress:
        - IpProtocol: 'tcp'
          FromPort: 80
          ToPort: 80
          CidrIp: '0.0.0.0/0'
      SecurityGroupEgress:
        - IpProtocol: -1
          CidrIp: '0.0.0.0/0'
      VpcId: !Ref VpcId

  # IAM roles to provide permissions.
  EBEC2Role:
    Type: AWS::IAM::Role
    Properties:
      RoleName: 'elastic-beanstalk-ec2-modernization-workshop-role'
      Description: "This role enables EC2 configuration"
      Path: '/'
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/AWSElasticBeanstalkWebTier'
        - 'arn:aws:iam::aws:policy/AWSElasticBeanstalkMulticontainerDocker'
        - 'arn:aws:iam::aws:policy/AWSElasticBeanstalkWorkerTier'
      AssumeRolePolicyDocument:
        Version: "2008-10-17"
        Statement:
          - Effect: "Allow"
            Principal:
              Service:
                - 'ec2.amazonaws.com'
            Action: "sts:AssumeRole"

  # Service role to provide permissions.
  EBServiceRole:
    Type: AWS::IAM::Role
    Properties:
      RoleName: 'elastic-beanstalk-service-modernization-workshop-role'
      Description: "This role enables EB Service configuration"
      Path: '/'
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/service-role/AWSElasticBeanstalkEnhancedHealth'
        - 'arn:aws:iam::aws:policy/service-role/AWSElasticBeanstalkService'
      AssumeRolePolicyDocument:
        Version: "2008-10-17"
        Statement:
          - Effect: "Allow"
            Principal:
              Service:
                - 'elasticbeanstalk.amazonaws.com'
            Action: "sts:AssumeRole"

  #Instance profile for the EB role.
  EBInstanceProfile:
    Type: AWS::IAM::InstanceProfile
    Properties:
      Path: "/"
      Roles:
        - Ref: EBEC2Role
  
  # Elastic Beanstalk Application.
  EBApp:
    Type: AWS::ElasticBeanstalk::Application
    Properties: 
      ApplicationName: !Ref ApplicationName
      Description: "AWS Elastic Beanstalk Legacy .NET Framework application"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



CFN/dev/Dev-Resources.yml [108:187]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Default: ""

  # -----------------------------------
  StaticHostingBucketName:
    Type: String
    Description: "Name of the bucket used to host static UI content"
    Default: "unishopui"

Resources:

  # Elastic Beanstalk resources.
  # Deploy the monolithic application in a Windows Server instance.
  # Securtiy groups for resource.
  EBSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: "Security Group to allow EB aplication to accept HTTP requests"
      SecurityGroupIngress:
        - IpProtocol: 'tcp'
          FromPort: 80
          ToPort: 80
          CidrIp: '0.0.0.0/0'
      SecurityGroupEgress:
        - IpProtocol: -1
          CidrIp: '0.0.0.0/0'
      VpcId: !Ref VpcId

  # IAM roles to provide permissions.
  EBEC2Role:
    Type: AWS::IAM::Role
    Properties:
      RoleName: 'elastic-beanstalk-ec2-modernization-workshop-role'
      Description: "This role enables EC2 configuration"
      Path: '/'
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/AWSElasticBeanstalkWebTier'
        - 'arn:aws:iam::aws:policy/AWSElasticBeanstalkMulticontainerDocker'
        - 'arn:aws:iam::aws:policy/AWSElasticBeanstalkWorkerTier'
      AssumeRolePolicyDocument:
        Version: "2008-10-17"
        Statement:
          - Effect: "Allow"
            Principal:
              Service:
                - 'ec2.amazonaws.com'
            Action: "sts:AssumeRole"

  # Service role to provide permissions.
  EBServiceRole:
    Type: AWS::IAM::Role
    Properties:
      RoleName: 'elastic-beanstalk-service-modernization-workshop-role'
      Description: "This role enables EB Service configuration"
      Path: '/'
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/service-role/AWSElasticBeanstalkEnhancedHealth'
        - 'arn:aws:iam::aws:policy/service-role/AWSElasticBeanstalkService'
      AssumeRolePolicyDocument:
        Version: "2008-10-17"
        Statement:
          - Effect: "Allow"
            Principal:
              Service:
                - 'elasticbeanstalk.amazonaws.com'
            Action: "sts:AssumeRole"

  #Instance profile for the EB role.
  EBInstanceProfile:
    Type: AWS::IAM::InstanceProfile
    Properties:
      Path: "/"
      Roles:
        - Ref: EBEC2Role
  
  # Elastic Beanstalk Application.
  EBApp:
    Type: AWS::ElasticBeanstalk::Application
    Properties: 
      ApplicationName: !Ref ApplicationName
      Description: "AWS Elastic Beanstalk Legacy .NET Framework application"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



