LoadBalancer と TargetGroup を DeploymentGroup にリンクしようとしていますが、テンプレートを実行すると、「プロパティ LoadBalancerInfo を指定できません」と表示されます。これが私のテンプレートのスナップショットです。私のテンプレートは正しいですか?
EC2TargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
HealthCheckIntervalSeconds: 30
HealthCheckProtocol: HTTP
HealthCheckTimeoutSeconds: 15
HealthyThresholdCount: 5
Matcher:
HttpCode: '200'
Name: !Ref EC2TargetGroupName
Port: 80
Protocol: HTTP
TargetGroupAttributes:
- Key: deregistration_delay.timeout_seconds
Value: '20'
UnhealthyThresholdCount: 3
VpcId: !Ref VPC
ApplicationLoadBalancer:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
Scheme: internet-facing
SecurityGroups:
- Ref: ELBSecurityGroup
Subnets: !Ref Subnets
myAutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
AutoScalingGroupName: !Ref ScalingGroupName
MinSize: "1"
MaxSize: !Ref MaxSize
HealthCheckGracePeriod: 300
LaunchTemplate:
LaunchTemplateId: !Ref launchTemplate
Version: !GetAtt launchTemplate.LatestVersionNumber
MyDeploymentGroup:
Type: AWS::CodeDeploy::DeploymentGroup
Properties:
ApplicationName: !Ref ApplicationName
DeploymentConfigName: CodeDeployDefault.AllAtOnce
ServiceRoleArn: !GetAtt [PipelineRole, Arn]
LoadBalancerInfo:
TargetGroupInfoList:
- Name: !Ref EC2TargetGroupName ############ ERROR ######
DeploymentStyle:
DeploymentType: BLUE_GREEN
DeploymentOption: WITH_TRAFFIC_CONTROL