aws-samples / aws-codedeploy-samples

Samples and template scenarios for AWS CodeDeploy
Apache License 2.0
637 stars 780 forks source link

A way to set TARGET_GROUP_LIST="_all_" to automatically assign the instances target group? #79

Open dom-monaco opened 6 years ago

dom-monaco commented 6 years ago

In the ELB common_function.sh you could set the ELB_LIST='all' and that would prevent the need to hard code ELB values. Im wondering if there is a way to do this for an ALB in elb_v2/ for TARGET_GROUP_LIST.

I have different TG for dev, staging, and prod and would have to manually change the script for every region, in addition the way our setup works it auto generates a TG name so if anything needed to change we would need to modify the script again as the TG name would have changed.

michaelwittig commented 6 years ago

It should be possible and I agree that this would be convenient:

  1. get the asg name of the instance id with autoscaling_group_name
  2. get the TargetGroupARNs of the asg