Skip to main content

Stage 4: Move Towards Modularization

As developers dive deeper into Terraform's capabilities, they begin to recognize the inefficiencies of their initial approaches. The move towards modularization represents a significant leap in managing infrastructure as code more effectively.

  1. Developers realize that a lot of code is getting copied and pasted, so they advance to writing modules to avoid duplication.
  2. Modules act like functions in Terraform: reusable and parameterized. They can be called multiple times and accept parameters.
  3. It works well for now, and developers succeed in bringing up all the environments. It certainly beats ClickOps.
New Problems
  1. These modules are "reusable" but usually just within the project itself and not written to be reused across the organization.
  2. Many assumptions are made on specific requirements of the problem at hand, and generalizing them is not of paramount concern.
  3. Lots of similar modules appear in the organization, some more maintained than others.
  4. No automated tests (E.g. terratest).
  5. Everyone is probably an Administrator.

Realization

As developers researched how to accomplish various tasks with Terraform while writing their modules, they came across one of Cloud Posse's hundreds of terraform modules. Then it dawned on them that they could avoid reinventing the wheel by using these modules.

Try Atmos!