In this book, we started with recipes for Terraform that concern its installation, the writing of the Terraform configuration, as well as the use of the Terraform CLI commands. Then we studied the sharing of the Terraform configuration by using modules. Finally, we focused on the use of Terraform to build an Azure infrastructure.
Now, in this chapter, we will discuss recipes that allow us to go further in our usage of Terraform. We will learn how to use the templates in Terraform via the generation of an inventory for Ansible using Terraform, and will test the Terraform configuration using the kitchen-terraform plugin. We will discuss how to prevent the destruction of resources, how to implement a zero-downtime deployment technique with Terraform, and how to detect the deletion of resources when Terraform applies changes.
Then we will discuss the use...