what is Terraform ?
Terraform allows you to write infrastructure as code for building, changing, and versioning infrastructure safely and efficiently, it can manage existing and popular cloud service providers as well as custom in-house solutions. if you want to spin up some machines coud platform, you can go into the web console and you can just start launching some new instances manually usiing web console click some buttons and then you can launch an instance. we can do same thing with Terraform which allows you to do with code. It is the automation of your infrastructure.
Terraform creates an execution plan as described in the steps it will do to reach the desired state, and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied.
Ansible, Chef, Puppet, Salt stack have a focus on automating the installation and configuration of software. Terraform can automate provisioning of the infrastructure itself. Terraform works well with automation software like Ansible to install software, after the infrastructure is provisioned.