[Question] Can I change Classic ELB to Application ELB with running configuration?

Hello,

I’m running configuration on AWS Classic Load Balancer. I want to migrate to Application ELB. Can I change the existing setup or I need to recreate the cluster? Can someone advise me on how to achieve this?

I have my doubts … i think that will not be possible.
Lets see if someone comes up with a solution for you, all the best.

AWS has a guide on migration to ALB: Migrate Your Classic Load Balancer. To follow those instructions an ELB currently managed by Terraform, there are two main options.

The first option is to use one of the two automatic migration mechanisms described in the guide, and not use Terraform for the migration at all. In that case, you should cease all Terraform operations on the affected workspace for the duration, and then once the automatic migration is complete update your Terraform configuration to describe the new ALB rather than the old ELB and update the Terraform state to match the new remote objects:

  • terraform state rm aws_elb.example to make Terraform “forget” the old ELB that no longer exists.
  • terraform import aws_lb.example example-id to associate the newly-created ALB with your new resource "aws_lb" block in the configuration.

The second option is to follow the “Manually” steps in the guide using equivalent Terraform configuration changes instead of direct manipulations via the AWS Console. Because this is a multi-step process, you will need to run terraform apply multiple times to create the equivalent results of each step. For example, your first step will probably be to add a new resource "aws_lb" ... block while keeping the existing resource "aws_elb" ... block, so you can follow the guide’s instructions on verifying the correct operation of the new load balancer before starting to send traffic to it.

Thank you! I will check this out. We have managed the migration on the AWS level, the most of my concerns was related to the new recourses that needs to be introduced to the terraform config, like AELB, and eventually new ELB’s target groups.

hello @mbm-rafal, I am facing the same challenge. Can you please provide some information on how you manage to attach the new ALB and target group to the elastic beanstalk configuration?