6.0.0: Add support for multiple target groups
BREAKING CHANGES:
- The variable
lb_arn
is no longer used as it was made redundant in a previous release. target_group_name
variable has been replaced withtarget_groups
.- The module now requires you to define the name of the target group(s) in the form of:
target_groups = [
{
target_group_name = "example"
container_port = 80
}
]
- A list of
target_group_arns
needs to be referenced with an index number. Example:
load_balancer_arn = module.alb.arn
port = "80"
protocol = "HTTP"
default_action {
type = "forward"
# Version 5.1.0 - previous
target_group_arn = module.fargate.target_group_arn
# Version 6.0.0 - current
target_group_arn = module.fargate.target_group_arn[0]
}
}
- ECS Service resources will be replaced to replace the
load_balancer
attribute. target_group
resources will be destroyed and recreated.
ENHANCEMENTS:
- Added a new example to demonstrate the setup of multiple target groups.
- Utilise default VPC and subnet resources in examples.
MIGRATION PROCEDURE:
In your terraform code follow the above changes that need to be made. In the UI, these steps need to be taken:
- Delete any listener rules associated with a target group created by this module.
- Delete the target groups
Once done, run your terraform plan and apply to have a clean migration.
What you will see in your terraform plan and apply are the following:
- Target groups and listener rules being recreated
- ECS Services being destroyed and then recreated