This example is developed to explain to my peers and friends.
Auto Scaling Group allows us to specify min, max and ideal count of Ec2 instances. ASG requires a launch template to identify what type of resource needs to be luanched.
launch-template.tf
NOTE: When a network interface is provided, the security groups must be a part of it. Hence network interface is commented out.
asg.tf
Destroying ASG will destroy the instances as well.