How to create multiple AWS instances but each with a different name?
Answer
resource "aws_instance" "server" {
count = 6
tags = {
Name = "instance-${count.index}"
}
}
The above configuration will create 6 instances, each with a different name.