/AIM-MSTR-TargetGroups.yml
YAML | 265 lines | 234 code | 26 blank | 5 comment | 0 complexity | 61d42189cb3495ccd5e3d210a97dda67 MD5 | raw file
- Description: For AIM (aka Assetworks and AimIQ)
- This CloudFormation (CF) Script creates n TargetGroups that will be used via the Output section below,
- by another CF script (AIM-MSTR-ALB.yml) that creates the Test/Prod ALB for AIM/Assetworks and AIMiq.
- Parameters:
- VPC:
- Type: AWS::EC2::VPC::Id
- Description: Choose which VPC the Application Load Balancer should be deployed to
- Resources:
- #The TargetGroups are created here. Two TargetGroups will be used in the Listener part of the ALB as the DefaultTargetGroup.
- #The Test TargetGroups will be used as the DefaultTargetGroups. The Dev TargetGroups will be used in the ListenerRule part of each Listener,
- #by matching a URL string traffic will be sent to the Dev TargetGroups.
- TargetGroupAssetworksDev443ALBmcf:
- Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
- Properties:
- HealthCheckIntervalSeconds: 10
- HealthCheckPath: /
- HealthCheckPort: 8080
- HealthCheckProtocol: HTTP
- HealthCheckTimeoutSeconds: 5
- HealthyThresholdCount: 2
- Matcher:
- HttpCode: '200'
- Name: Assetworks-Dev-443-ALB-mcf
- Port: 8080
- Protocol: HTTP
- TargetGroupAttributes:
- - Key: deregistration_delay.timeout_seconds
- Value: '300'
- UnhealthyThresholdCount: 2
- VpcId:
- Ref: VPC
- TargetGroupAssetworksTest443ALBmcf:
- Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
- Properties:
- HealthCheckIntervalSeconds: 10
- HealthCheckPath: /
- HealthCheckPort: 8080
- HealthCheckProtocol: HTTP
- HealthCheckTimeoutSeconds: 5
- HealthyThresholdCount: 2
- Matcher:
- HttpCode: '200'
- Name: Assetworks-Test-443-ALB-mcf
- Port: 8080
- Protocol: HTTP
- TargetGroupAttributes:
- - Key: deregistration_delay.timeout_seconds
- Value: '300'
- UnhealthyThresholdCount: 2
- VpcId:
- Ref: VPC
- TargetGroupAssetworks443ALBmcf:
- Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
- Properties:
- HealthCheckIntervalSeconds: 10
- HealthCheckPath: /
- HealthCheckPort: 8080
- HealthCheckProtocol: HTTP
- HealthCheckTimeoutSeconds: 5
- HealthyThresholdCount: 2
- Matcher:
- HttpCode: '200'
- Name: Assetworks-443-ALB-mcf
- Port: 8080
- Protocol: HTTP
- TargetGroupAttributes:
- - Key: deregistration_delay.timeout_seconds
- Value: '300'
- UnhealthyThresholdCount: 2
- VpcId:
- Ref: VPC
- TargetGroupaim1dev8443ALBmcf:
- Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
- Properties:
- HealthCheckIntervalSeconds: 10
- HealthCheckPath: /
- HealthCheckPort: 8081
- HealthCheckProtocol: HTTP
- HealthCheckTimeoutSeconds: 5
- HealthyThresholdCount: 2
- Matcher:
- HttpCode: '200'
- Name: aim1-dev-8443-ALB-mcf
- Port: 8081
- Protocol: HTTP
- TargetGroupAttributes:
- - Key: deregistration_delay.timeout_seconds
- Value: '300'
- UnhealthyThresholdCount: 2
- VpcId:
- Ref: VPC
- TargetGroupaim1test8443ALBmcf:
- Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
- Properties:
- HealthCheckIntervalSeconds: 10
- HealthCheckPath: /
- HealthCheckPort: 8081
- HealthCheckProtocol: HTTP
- HealthCheckTimeoutSeconds: 5
- HealthyThresholdCount: 2
- Matcher:
- HttpCode: '200'
- Name: aim1-test-8443-ALB-mcf
- Port: 8081
- Protocol: HTTP
- TargetGroupAttributes:
- - Key: deregistration_delay.timeout_seconds
- Value: '300'
- UnhealthyThresholdCount: 2
- VpcId:
- Ref: VPC
- TargetGroupaim18443ALBmcf:
- Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
- Properties:
- HealthCheckIntervalSeconds: 10
- HealthCheckPath: /
- HealthCheckPort: 8081
- HealthCheckProtocol: HTTP
- HealthCheckTimeoutSeconds: 5
- HealthyThresholdCount: 2
- Matcher:
- HttpCode: '200'
- Name: aim1-8443-ALB-mcf
- Port: 8081
- Protocol: HTTP
- TargetGroupAttributes:
- - Key: deregistration_delay.timeout_seconds
- Value: '300'
- UnhealthyThresholdCount: 2
- VpcId:
- Ref: VPC
- TargetGroupaimiqdev443ALBmcf:
- Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
- Properties:
- HealthCheckIntervalSeconds: 10
- HealthCheckPath: /
- HealthCheckPort: 8080
- HealthCheckProtocol: HTTP
- HealthCheckTimeoutSeconds: 5
- HealthyThresholdCount: 2
- Matcher:
- HttpCode: '200'
- Name: aimiq-dev-443-ALB-mcf
- Port: 8080
- Protocol: HTTP
- TargetGroupAttributes:
- - Key: deregistration_delay.timeout_seconds
- Value: '300'
- UnhealthyThresholdCount: 2
- VpcId:
- Ref: VPC
- TargetGroupaimiqtest443ALBmcf:
- Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
- Properties:
- HealthCheckIntervalSeconds: 10
- HealthCheckPath: /
- HealthCheckPort: 8080
- HealthCheckProtocol: HTTP
- HealthCheckTimeoutSeconds: 5
- HealthyThresholdCount: 2
- Matcher:
- HttpCode: '200'
- Name: aimiq-test-443-ALB-mcf
- Port: 8080
- Protocol: HTTP
- TargetGroupAttributes:
- - Key: deregistration_delay.timeout_seconds
- Value: '300'
- UnhealthyThresholdCount: 2
- VpcId:
- Ref: VPC
- TargetGroupaimiq443ALBmcf:
- Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
- Properties:
- HealthCheckIntervalSeconds: 10
- HealthCheckPath: /
- HealthCheckPort: 8080
- HealthCheckProtocol: HTTP
- HealthCheckTimeoutSeconds: 5
- HealthyThresholdCount: 2
- Matcher:
- HttpCode: '200'
- Name: aimiq-443-ALB-mcf
- Port: 8080
- Protocol: HTTP
- TargetGroupAttributes:
- - Key: deregistration_delay.timeout_seconds
- Value: '300'
- UnhealthyThresholdCount: 2
- VpcId:
- Ref: VPC
- #The outputs are created here. Each TargetGroup needs a unique Export string that can be used by other CF scripts.
- #That export string is created below in the Export: Name: section.
- Outputs:
- TargetGroupARNAssetworksDev443ALBmcf:
- Description: The ARN of Assetworks-Dev-443-ALB-mcf Target Group
- Value: !Ref TargetGroupAssetworksDev443ALBmcf
- Export:
- Name: !Sub "${AWS::StackName}-TargetGroupARNAssetworksDev443ALBmcf"
- TargetGroupARNAssetworksTest443ALBmcf:
- Description: The ARN of Assetworks-Test-443-ALB-mcf Target Group
- Value: !Ref TargetGroupAssetworksTest443ALBmcf
- Export:
- Name: !Sub "${AWS::StackName}-TargetGroupARNAssetworksTest443ALBmcf"
- TargetGroupARNAssetworks443ALBmcf:
- Description: The ARN of Assetworks-443-ALB-mcf Target Group
- Value: !Ref TargetGroupAssetworks443ALBmcf
- Export:
- Name: !Sub "${AWS::StackName}-TargetGroupARNAssetworks443ALBmcf"
- TargetGroupARNaim1dev8443ALBmcf:
- Description: The ARN of aim1-Dev-443-ALB-mcf Target Group
- Value: !Ref TargetGroupaim1dev8443ALBmcf
- Export:
- Name: !Sub "${AWS::StackName}-TargetGroupARNaim1dev8443ALBmcf"
- TargetGroupARNaim1test8443ALBmcf:
- Description: The ARN of aim1-Test-443-ALB-mcf Target Group
- Value: !Ref TargetGroupaim1test8443ALBmcf
- Export:
- Name: !Sub "${AWS::StackName}-TargetGroupARNaim1test8443ALBmcf"
- TargetGroupARNaim18443ALBmcf:
- Description: The ARN of aim1-443-ALB-mcf Target Group
- Value: !Ref TargetGroupaim18443ALBmcf
- Export:
- Name: !Sub "${AWS::StackName}-TargetGroupARNaim18443ALBmcf"
- TargetGroupARNaimiqdev443ALBmcf:
- Description: The ARN of aimiq-dev-443-ALB-mcf Target Group
- Value: !Ref TargetGroupaimiqdev443ALBmcf
- Export:
- Name: !Sub "${AWS::StackName}-TargetGroupARNaimiqdev443ALBmcf"
- TargetGroupARNaimiqtest443ALBmcf:
- Description: The ARN of aimiq-test-443-ALB-mcf Target Group
- Value: !Ref TargetGroupaimiqtest443ALBmcf
- Export:
- Name: !Sub "${AWS::StackName}-TargetGroupARNaimiqtest443ALBmcf"
- TargetGroupARNaimiq443ALBmcf:
- Description: The ARN of aimiq-443-ALB-mcf Target Group
- Value: !Ref TargetGroupaimiq443ALBmcf
- Export:
- Name: !Sub "${AWS::StackName}-TargetGroupARNaimiq443ALBmcf"