templates/bbb-on-aws-bbbappscalable.template.yaml [173:234]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
  BBBApplicationAutoScaling:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      VPCZoneIdentifier: !Ref BBBPublicApplicationSubnets
      LaunchTemplate:
        LaunchTemplateId: !Ref BBBApplicationInstanceLaunchTemplate
        Version: !GetAtt BBBApplicationInstanceLaunchTemplate.LatestVersionNumber
      TerminationPolicies:
        - DEFAULT
      MaxSize: !Ref BBBApplicationMaxInstances
      MinSize: !Ref BBBApplicationMinInstances
      DesiredCapacity: !Ref BBBApplicationDesiredInstances
      NotificationConfiguration:
        TopicARN:
          Ref: BBBNotificationTopic
        NotificationTypes:
          - autoscaling:EC2_INSTANCE_LAUNCH
          - autoscaling:EC2_INSTANCE_LAUNCH_ERROR
          - autoscaling:EC2_INSTANCE_TERMINATE
          - autoscaling:EC2_INSTANCE_TERMINATE_ERROR
    CreationPolicy:
      ResourceSignal:
        Timeout: PT30M
    UpdatePolicy:
      AutoScalingReplacingUpdate:
        WillReplace: true

  BBBApplicationEC2Role:
    Type: AWS::IAM::Role
    Properties:
      RoleName: BBBApplicationEC2Role
      AssumeRolePolicyDocument:
        Statement:
          - Effect: Allow
            Principal:
              Service: [ ec2.amazonaws.com ]
            Action: [ "sts:AssumeRole" ]
      Path: /
      Policies:
        - PolicyName: "root"
          PolicyDocument:
            Version: "2012-10-17"
            Statement:
              - Effect: "Allow"
                Action:
                  - route53:ChangeResourceRecordSets
                  - route53:GetHostedZone
                  - route53:ListResourceRecordSets
                Resource: !Sub "arn:aws:route53:::hostedzone/${BBBHostedZone}"
              - Effect: Allow
                Action:
                  - secretsmanager:GetSecretValue
                Resource:
                  - !Ref BBBTurnSecret
              - Effect: Allow
                Action:
                  - s3:GetObject
                Resource:
                  - !Sub "arn:aws:s3:::${BBBStackBucketStack}/*"
              - Effect: Allow
                Action:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/bbb-on-aws-bbbappsingle.template.yaml [156:217]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
  BBBApplicationAutoScaling:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      VPCZoneIdentifier: !Ref BBBPublicApplicationSubnets
      LaunchTemplate:
        LaunchTemplateId: !Ref BBBApplicationInstanceLaunchTemplate
        Version: !GetAtt BBBApplicationInstanceLaunchTemplate.LatestVersionNumber
      TerminationPolicies:
        - DEFAULT
      MaxSize: !Ref BBBApplicationMaxInstances
      MinSize: !Ref BBBApplicationMinInstances
      DesiredCapacity: !Ref BBBApplicationDesiredInstances
      NotificationConfiguration:
        TopicARN:
          Ref: BBBNotificationTopic
        NotificationTypes:
          - autoscaling:EC2_INSTANCE_LAUNCH
          - autoscaling:EC2_INSTANCE_LAUNCH_ERROR
          - autoscaling:EC2_INSTANCE_TERMINATE
          - autoscaling:EC2_INSTANCE_TERMINATE_ERROR
    CreationPolicy:
      ResourceSignal:
        Timeout: PT30M
    UpdatePolicy:
      AutoScalingReplacingUpdate:
        WillReplace: true

  BBBApplicationEC2Role:
    Type: AWS::IAM::Role
    Properties:
      RoleName: BBBApplicationEC2Role
      AssumeRolePolicyDocument:
        Statement:
          - Effect: Allow
            Principal:
              Service: [ ec2.amazonaws.com ]
            Action: [ "sts:AssumeRole" ]
      Path: /
      Policies:
        - PolicyName: "root"
          PolicyDocument:
            Version: "2012-10-17"
            Statement:
              - Effect: "Allow"
                Action:
                  - route53:ChangeResourceRecordSets
                  - route53:GetHostedZone
                  - route53:ListResourceRecordSets
                Resource: !Sub "arn:aws:route53:::hostedzone/${BBBHostedZone}"
              - Effect: Allow
                Action:
                  - secretsmanager:GetSecretValue
                Resource:
                  - !Ref BBBTurnSecret
              - Effect: Allow
                Action:
                  - s3:GetObject
                Resource:
                  - !Sub "arn:aws:s3:::${BBBStackBucketStack}/*"
              - Effect: Allow
                Action:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



