Terraform is an open-source infrastructure as code software tool created by HashiCorp.
The application infrastructure is defined in code by defining needed components like compute instances, storage buckets, networks, load-balancers, firewalls, etc.
Ansible is a simple automation language that can perfectly describe an IT application infrastructure.