Skip to content

(aws) Allow selection of VPC load balancers on Classic ASGs #2265

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

Merged
merged 1 commit into from
May 13, 2016
Merged

(aws) Allow selection of VPC load balancers on Classic ASGs #2265

merged 1 commit into from
May 13, 2016

Conversation

anotherchrisberry
Copy link
Contributor

AWS allows users to attach any load balancer to any ASG, regardless of its VPC association.

We're taking a more opinionated approach here, only allowing Classic ASGs to attach to VPC load balancers (not letting VPC ASGs attach to Classic ELBs). This is to help folks migrate away from Classic by slowly shifting traffic over to VPC instances.

We don't expect this to be heavily utilized, but it's important for teams that need to migrate over incrementally.

@zanthrash PTAL

screen shot 2016-05-13 at 11 37 39 am

(If the link is clicked, or VPC load balancers have been selected)
screen shot 2016-05-13 at 11 36 23 am

var testVpc = test.vpcId || null;
return test.name === loadBalancer.name && test.region === loadBalancer.region && test.account === loadBalancer.accountId && testVpc === loadBalancer.vpcId;
})[0];
let [appLoadBalancer] = app.loadBalancers.data.filter(function (test) {
Copy link
Contributor

@zanthrash zanthrash May 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does wrapping a variable name in square brackets do? Is it to coerce the outputs of the filter into an array?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, exactly - it's using ES6 array destructuring. Since filter returns an array, this sets appLoadBalancer to the first item in the array (or undefined if the filter returns an empty collection).

@zanthrash
Copy link
Contributor

LGTM

@anotherchrisberry anotherchrisberry merged commit 42fa9c8 into spinnaker:master May 13, 2016
@anotherchrisberry anotherchrisberry deleted the vpc-classic-elbs branch May 13, 2016 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants