Terraform
In this section, we are going to introduce Terraform, one of the most widely used IaC solutions in the wild.
Terraform is an IaC tool developed by HashiCorp. The rationale behind using it is similar to using Ansible to configure your systems: infrastructure configuration is kept in text files. They are not YAML, as with Ansible; instead, they are written in a special configuration language developed by HashiCorp: HashiCorp Configuration Language (HCL). Text files are easily versioned, which means that infrastructure changes can be stored in a version control system such as Git.
Actions performed by Terraform are more complicated than those you’ve seen in Ansible. A single HCL statement can mean setting up a whole bunch of virtual servers and routes between them. So, while Terraform is also declarative like Ansible, it is higher level than other tools. Also, contrary to Ansible, Terraform is state-aware. Ansible has a list of actions to perform and on each run...