Summary

In this chapter dedicated to Terraform, we have seen that its installation can be done either manually or with scripts. 

To apply it, we have detailed the different steps of its configuration to provision an Azure infrastructure using an Azure service principal.

We also explained step by step its local execution with its main command lines, which are init, plan, apply, and destroy as well as its life cycle in a CI/CD process. This chapter ends with the protection of the tfstate in an Azure remote backend.

Terraform is, therefore, a tool that is in line with the principles of IaC. The Terraform code is readable and understandable by users, and its execution integrates very well into a CI/CD pipeline that will allow you to provision a cloud infrastructure automatically.

Throughout this book, we will continue to talk about Terraform, with additions about its use with Packer, Azure Kubernetes Services, and downtime reduction.

In the next chapter, we will see the next step of the IaC, which is configuration management by using Ansible. It will cover its installation, its usage for configuring our provisioned virtual machine, and how to protect secrets with Ansible Vault.