In the previous recipes, we learned how to use the Terraform Cloud platform to store Terraform state files in a remote backend. Then, we used Terraform Cloud as a private registry of modules and learned how to run Terraform configurations remotely in Terraform Cloud.
All these actions were mainly done via the Terraform Cloud UI web interface. In the There's more... section of the previous recipe, we discussed that it is also possible to use the Terraform CLI locally to run Terraform remotely.
In a company, we need to automate all of these actions for the following reasons:
- The use of the UI is ergonomic but requires a lot of manual actions, which, with many projects, can be very time- and resource-consuming.
- In Terraform Cloud, the execution workflow in remote mode is fixed with the execution of the plan command, as well as the application. It isn't possible to add other actions (which we have studied in this book) such as the execution...