Complex variable

i am unable to deal with the map variables and list variable together. Is is possible in terraform 1.3.9.

elb_listener = {
“alb_listener” = {
lb_arn = aws_lb.docshift-elb[“xyz_alb”].arn,
port = “80”,
protocol = “HTTP”,
action = “forward”,
tg_arn = aws_lb_target_group.docshift-elb-tg[“xyz_alb_tg”].arn
}
“nlb_listener” = {
lb_arn = aws_lb.docshift-elb[“abc_nlb”].arn,
port = [“1100”, “1099”],
protocol = “TCP”,
action = “forward”,
tg_arn = aws_lb_target_group.docshift-elb-tg[“abc_nlb_tg”].arn
}

Additionally, nothing you’ve written in your post actually explains what the problem you are experiencing is?

so what needs to change in my query or post.

You need to explain what you need help with. So far you have not.

ok, i already mentioned that how to deal with complex variables in the one object. Like list and map comes in 1 object. On that basis how to use for_each or count.

Sorry, I tried, but there’s still not enough detail here for me to understand what you’re having trouble with.

ok let me explain you. Suppose in locals we have 2 variables like one is list(any) and other simple string and these under one object which using map. So i need to create 2 loops 1 is for map and other is for list as well.

Hope so i am able to explain you my query.