Getting our feet wet with Terraform
In this section, we will provide a brief overview of the essential Terraform workflow and then move on to a “Hello World” example to test our setup.
Understanding the core Terraform workflow
It may take most of us around 2-4 weeks to learn a new tool, platform, or framework. However, it would probably take us just a few hours (to, at most, a few days) to learn Terraform since using it is straightforward and easy. When using Terraform, engineers generally follow a process similar to what we have in Figure 3.3:
Figure 3.3 – A common workflow when using Terraform to create and update resources
Once we have the configuration file (or files) ready, we simply run terraform init
to initialize the Terraform environment. The terraform init
command is usually executed when our environment has not been initialized yet or when additional files or plugins need to be downloaded. The next step involves using...