Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoscaling Groups Support more than a single Target #7544

Closed
sd3z opened this issue Apr 23, 2020 · 2 comments
Closed

Autoscaling Groups Support more than a single Target #7544

sd3z opened this issue Apr 23, 2020 · 2 comments
Assignees
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling @aws-cdk/aws-codedeploy Related to AWS CodeDeploy guidance Question that needs advice or information.

Comments

@sd3z
Copy link

sd3z commented Apr 23, 2020

throw new Error('Cannot add AutoScalingGroup to 2nd Target Group');

I'm not sure if I've implemented this correctly, but I have five Code Deploy applications using 5 different Target Groups that I would like to attach to a single AutoScaling Group

When I attempt to attach a second ApplicationTargetGroup to the same asg it fails with the error Cannot add AutoScalingGroup to 2nd Target Group, but if I jump into the console I can attach multiple Targets.

appWebTargetGroup = new ApplicationTargetGroup(this, 'WebTargetGroup', {}); 
appAPITargetGroup = new ApplicationTargetGroup(this, 'ApiTargetGroup', {}); 

this.asg.attachToApplicationTargetGroup(appWebTargetGroup );
this.asg.attachToApplicationTargetGroup(appAPITargetGroup );

If I was to comment out the line attaching the appAPITargetGroup, everything works as expected.

@SomayaB SomayaB added @aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling @aws-cdk/aws-codedeploy Related to AWS CodeDeploy guidance Question that needs advice or information. labels Apr 23, 2020
@sd3z
Copy link
Author

sd3z commented Apr 27, 2020

Actually it looks like this is a bug and the work around was mentioned here

@NetaNir
Copy link
Contributor

NetaNir commented May 11, 2020

duplicate #5667

@NetaNir NetaNir closed this as completed May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling @aws-cdk/aws-codedeploy Related to AWS CodeDeploy guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants