Terraform

You noticed a lot of your Terraform code/configuration is duplicated, between repositories and also within the same repository between different directories. What one way you may adopt that will help handling with that?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

Using Terraform modules can help greatly with duplicated code and so different environments for example (staging and production) can reuse the same code by using the same modules.