nixops-aws icon indicating copy to clipboard operation
nixops-aws copied to clipboard

Nixops doesn't support AWS ALB (app load balancers)

Open deepfire opened this issue 6 years ago • 1 comments

Just a place to facilitate discussion.

deepfire avatar Dec 21 '18 14:12 deepfire

Working with this today, it appears that there is no way to get a EC2 instance deployed by NixOps to be registered into an AWS target group (which is what an ALB will route traffic to). Even if NixOps is not capable of creating app load balancers, it would be very helpful to assign EC2 instances to a target group (and in effect add them to a load balancer).

It would be ideal if this worked in a way similar to assigning security groups. For example:

{
  deployment.targetEnv = "ec2";
  deployment.ec2.instanceType = "m1.small";

  # not currently a real option
  deployment.ec2.targetGroups = [ "app-servers" "app-servers-https" ];
}

The challenge is that target groups are managed through the Elastic Load Balancer API, and not the EC2 instance API. So whereas fields like securityGroups or placementGroup are EC2 settings, target groups are not.

charukiewicz avatar Feb 21 '19 04:02 charukiewicz