Calling modules and debugging

Somewhat new to terraform in AWS. In several cases, I’ve decided to modularize my calls for simplifying things. This is for terraform v12.

For example, which creating an alb for fargate tasks, I call a module which creates the alb, security group rules, etc etc.
The problem I’ve run into is, when there is a state problem which causes plan/apply to fail, I can’t see which call to the module is failing. It shows the module information, but not the caller parameters.

So, if I call module “alb_creator” with the parameters for my TaskA, TaskB, and TaskC, on plan failure I can’t see which Task call to troubleshoot.

it might also help if I point out that this seems happen most when I have state problem. In the past, I’ve moved from a resource declaration to adding a count condition which turns the resource into an array of items.

The only solution I’ve found so far is just to avoid calling submodules and just declare everything over and over again in code. Any suggestions?