Multiple destination for single rule in aws_alb_listener

I am facing issues with adding multiple destinations for a single rule in aws_alb_listener.
The name of the target group is distinctive.

resource “aws_alb_target_group” “backend-tg-1” {
resource “aws_alb_target_group” “backendapi-tg-1” {

I tried to use dynamic block, but it is not working since the name is different and being called from a different location.

resource “aws_alb_listener” “test” {

port = 443
protocol = “HTTPS”

default_action {
target_group_arn =
#need to more target_group_arn
type = “forward”