As discussed in the previous recipe, changing certain properties on resources described in the Terraform configuration can lead to their destruction and subsequent recreation. Resources are destroyed and recreated in the order in which they are run in Terraform. In other words, the first resource to be run will first be destroyed and then it will be recreated, and in a production context, during this time period, it will lead to downtime, that is, a service interruption. This downtime can be greater or smaller depending on the type of resources that will have to be destroyed and then recreated.
In Terraform, there is a mechanism that allows for zero downtime and therefore avoids this service interruption when deleting a resource.
In this recipe, we will study how to implement zero downtime on a resource described in a Terraform...