Features Of Terraform
Infrastructure as Code: Terraform allows organizations to define cloud infrastructure using code in declarative format. after written this code can be version controlled in various vcs systems like git, gitlab etc.
Resource Tracking: Terraform keeps track of the resources stored in a state file. This state file has a extension of .tf and acts as a source of truth, so Terraform knows what already exists and what needs to be changed.
Supports Multi-Cloud Providers: Terraform supports multiple cloud providers (AWS, Azure, Google Cloud, etc.). Organizations can use the same Terraform code to manage resources present or running on different clouds.
Review Execution: Before making any changes, Terraform generates an execution plan that shows what it will do (create, update, or delete resources). we can review this plan and approve it before applying the changes.
How To Create Autoscaling Group In AWS Using Terraform ?
An auto-scaling group is a service that is provided in EC2 and is primarily used for an automatic increase or decrease in a number of EC2 instances based on the application’s user traffic. For example, if your application is experiencing high traffic, the auto-scaling group can launch extra instances to handle the increased load, and if the traffic coming towards to application is low, the auto-scaling group can shut down or terminate unnecessary instances for cost-saving purposes. The auto-scaling group can be created based on scaling policies, These policies can be defined for scaling in and out in response to various metrics, such as CPU utilization, network traffic, or custom metrics.