How to give distinct name to instances created as part of autoscaling group in AWS?

Hi,

I want to know whether there is any way to generate unique names to instances created as part of autoscaling group. I am using the community module.

This is a relevant snippet:

module "docker-swarm-manager-asg" {
source = “terraform-aws-modules/autoscaling/aws”
version = “~> 3.0”
name = “ var.environment− {var.role}”
lc_name = “ var.environment− {var.role}-launch-configuration”
image_id = data.aws_ami.docker-swarm-manager-ami.image_id

This creates the instances but provides same name. I want to have some differentiator in the names. It may be good to have names like ‘dev-docker-swarm-manager-1’, ‘dev-docker-swarm-manager-2’ and such, but I would be okay with anything random like ‘dev-docker-swarm-manager-xxxyyy’ and such.