Introduction to Terraform
Terraform is an open source tool created and maintained by HashiCorp. It allows you to specify your infrastructure in the form of human-readable configuration files. Similar to Ansible, it works in a declarative manner, which means that you specify the expected outcome, and Terraform makes sure your environment is created as specified.
Before we dive into a concrete example, let's spend a moment understanding how Terraform works.
Understanding Terraform
Terraform reads a configuration file and adjusts the cloud resources accordingly. Let's look at the following diagram, which presents this process:
A user creates Configuration File and starts the Terraform tool. Then, Terraform checks the Terraform State and uses Terraform Provider to translate the declarative configuration file into the requests called against Target API, which is specific for the given cloud provider. As an...