In the previous recipes of this chapter, we discussed how to install Terraform locally, either manually or via a script, depending on the local operating system.
In this recipe, we will learn how to run Terraform in a Docker container, which will allow us to enjoy the following benefits:
- There is no need to install Terraform locally.
- We can have a Terraform runtime environment independent of the local operating system.
- We can test our Terraform configuration with different versions of Terraform.
Let's get started!