I use the module https://registry.terraform.io/modules/terraform-aws-modules/autoscaling/aws/latest provisioned ec2 instances with AWS auto scaling group enabled. However, there is no output of private ip of this module. I may use the user data to install needed software and components. But, I am not able to use the ec2 instances as my application server since there is no ip address I may use to logon and deploy new releases of my application. How to solve the problem?
That is correct and this is by design. The module just creates ASG and it is not aware of its instances, as the instances are created and managed independently by ASG.
How to solve the problem?
You either use SSM Run Command to execute some ad-hoc commands on your instances in ASG.
For deployment purposes you should use CodeDeploy or use ASG instance refresh.
Either way, ssh'ing into the instances managed by ASG for deployment of applications is the last thing you should do and should be avoided as it will only lead to problems in the long term.
If you really need to get the info about the instances, you have to tag them and use aws_instances data source.