In several recipes in this book, we have discussed the organization of the files that contain the Terraform configuration. We examined this more specifically in the Provisioning infrastructure in multiple environments recipe in Chapter 2, Writing Terraform Configuration, which outlines several architecture solutions.
One of the best practices regarding the structure of the configuration is to separate the Terraform configuration into infrastructure and application components, as explained in the article at https://www.cloudreach.com/en/resources/blog/how-to-simplify-your-terraform-code-structure/. The challenge with a structure split into several configurations is the maintenance of dependencies and run schedules between these components.
Among all the third-party tools that revolve around Terraform, there is Terragrunt (https://terragrunt.gruntwork.io/), developed by Gruntwork. Terragrunt is open source and offers a lot of...