Refactoring my Terraform

Antoine - Jul 12 '20 - - Dev Community

Photo by Suzanne D. Williams on Unsplash

We use Terraform in our project, but we struggle recently because it's too big.
We already use modules, but it helps us divide code to keep code maintainable. Unfortunately, it does not split state. So any changes (update provider version, or change an application configuration) can bring us many update.

Lastly, we have a brilliant idea: let's refactor our terraform in order to avoid this. But we have no clue how.

Reading this post we recognize the symptom we are facing.

So we have started to decouple some module and use data source instead of passing variables between modules.

Hope this helps !

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player